Work profile
.
this
link提供了注册企业、创建策略和配置设备的快速入门指南。
快速入门是一个很好的解决方案
Colab notebook
我想是用Python编写的(正如错误所示)。我已经在这个colab笔记本中成功创建了一个企业,要创建一个基本策略,我需要运行这段代码
import json
policy_name = enterprise_name + '/policies/policy1'
policy_json = '''
{
"applications": [
{
"packageName": "com.android.chrome",
"installType": "FORCE_INSTALLED"
}
],
"debuggingFeaturesAllowed": true
}
'''
androidmanagement.enterprises().policies().patch(
name=policy_name,
body=json.loads(policy_json)
).execute()
TypeError Traceback (most recent call last)
<ipython-input-7-fa6c551fe8df> in <module>()
17 androidmanagement.enterprises().policies().patch(
18 name=policy_name,
---> 19 body=json.loads(policy_json)
20 ).execute()
/usr/local/lib/python3.6/dist-packages/googleapiclient/discovery.py in method(self, **kwargs)
740 raise TypeError(
741 'Parameter "%s" value "%s" does not match the pattern "%s"' %
--> 742 (name, pvalue, regex))
743
744 for name, enums in six.iteritems(parameters.enum_params):
TypeError: Parameter "name" value "LC01gzjgxa/policies/policy1" does not match the pattern "^enterprises/[^/]+/policies/[^/]+$"
有人能帮我解决这个错误吗?