def create_as(access_token, subscription_id, resource_group, as_name,<EOL>update_domains, fault_domains, location):
endpoint = '<STR_LIT>'.join([get_rm_endpoint(),<EOL>'<STR_LIT>', subscription_id,<EOL>'<STR_LIT>', resource_group,<EOL>'<STR_LIT>', as_name,<EOL>'<STR_LIT>', COMP_API])<EOL>as_body = {'<STR_LIT:location>': location}<EOL>properties = {'<STR_LIT>': update_domains}<EOL>properties['<STR_LIT>'] = fault_domains<EOL>as_body['<STR_LIT>'] = properties<EOL>body = json.dumps(as_body)<EOL>return do_put(endpoint, body, access_token)<EOL>
Create availability set.

    Args:
        access_token (str): A valid Azure authentication token.
        subscription_id (str): Azure subscription id.
        resource_group (str): Azure resource group name.
        as_name (str): Name of the new availability set.
        update_domains (int): Number of update domains.
        fault_domains (int): Number of fault domains.
        location (str): Azure data center location. E.g. westus.

    Returns:
        HTTP response. JSON body of the availability set properties.