def create_vmss(access_token, subscription_id, resource_group, vmss_name, vm_size, capacity,<EOL>publisher, offer, sku, version, subnet_id, location, be_pool_id=None,<EOL>lb_pool_id=None, storage_type='<STR_LIT>', username='<STR_LIT>', password=None,<EOL>public_key=None, overprovision=True, upgrade_policy='<STR_LIT>',<EOL>public_ip_per_vm=False):
endpoint = '<STR_LIT>'.join([get_rm_endpoint(),<EOL>'<STR_LIT>', subscription_id,<EOL>'<STR_LIT>', resource_group,<EOL>'<STR_LIT>', vmss_name,<EOL>'<STR_LIT>', COMP_API])<EOL>vmss_body = {'<STR_LIT:location>': location}<EOL>vmss_sku = {'<STR_LIT:name>': vm_size, '<STR_LIT>': '<STR_LIT>', '<STR_LIT>': capacity}<EOL>vmss_body['<STR_LIT>'] = vmss_sku<EOL>properties = {'<STR_LIT>': overprovision}<EOL>properties['<STR_LIT>'] = {'<STR_LIT>': upgrade_policy}<EOL>os_profile = {'<STR_LIT>': vmss_name}<EOL>os_profile['<STR_LIT>'] = username<EOL>if password is not None:<EOL><INDENT>os_profile['<STR_LIT>'] = password<EOL><DEDENT>if public_key is not None:<EOL><INDENT>if password is None:<EOL><INDENT>disable_pswd = True<EOL><DEDENT>else:<EOL><INDENT>disable_pswd = False<EOL><DEDENT>linux_config = {'<STR_LIT>': disable_pswd}<EOL>pub_key = {'<STR_LIT:path>': '<STR_LIT>' + username + '<STR_LIT>'}<EOL>pub_key['<STR_LIT>'] = public_key<EOL>linux_config['<STR_LIT>'] = {'<STR_LIT>': [pub_key]}<EOL>os_profile['<STR_LIT>'] = linux_config<EOL><DEDENT>vm_profile = {'<STR_LIT>': os_profile}<EOL>os_disk = {'<STR_LIT>': '<STR_LIT>'}<EOL>os_disk['<STR_LIT>'] = {'<STR_LIT>': storage_type}<EOL>os_disk['<STR_LIT>'] = '<STR_LIT>'<EOL>storage_profile = {'<STR_LIT>': os_disk}<EOL>storage_profile['<STR_LIT>'] ={'<STR_LIT>': publisher, '<STR_LIT>': offer, '<STR_LIT>': sku, '<STR_LIT:version>': version}<EOL>vm_profile['<STR_LIT>'] = storage_profile<EOL>nic = {'<STR_LIT:name>': vmss_name}<EOL>ip_config = {'<STR_LIT:name>': vmss_name}<EOL>ip_properties = {'<STR_LIT>': {'<STR_LIT:id>': subnet_id}}<EOL>if be_pool_id is not None:<EOL><INDENT>ip_properties['<STR_LIT>'] = [{'<STR_LIT:id>': be_pool_id}]<EOL><DEDENT>if lb_pool_id is not None:<EOL><INDENT>ip_properties['<STR_LIT>'] = [{'<STR_LIT:id>': lb_pool_id}]<EOL><DEDENT>if public_ip_per_vm is True:<EOL><INDENT>ip_properties['<STR_LIT>'] = {<EOL>'<STR_LIT:name>': '<STR_LIT>', '<STR_LIT>': {'<STR_LIT>': <NUM_LIT:15>}}<EOL><DEDENT>ip_config['<STR_LIT>'] = ip_properties<EOL>nic['<STR_LIT>'] = {'<STR_LIT>': True, '<STR_LIT>': [ip_config]}<EOL>network_profile = {'<STR_LIT>': [nic]}<EOL>vm_profile['<STR_LIT>'] = network_profile<EOL>properties['<STR_LIT>'] = vm_profile<EOL>vmss_body['<STR_LIT>'] = properties<EOL>body = json.dumps(vmss_body)<EOL>return do_put(endpoint, body, access_token)<EOL>
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.