REST Resource: enterprises.enrollmentTokens
资源:EnrollmentToken
JSON 表示法 |
{
"name": string,
"value": string,
"duration": string,
"expirationTimestamp": string,
"policyName": string,
"additionalData": string,
"qrCode": string,
"oneTimeOnly": boolean,
"user": {
object (User )
},
"allowPersonalUsage": enum (AllowPersonalUsage )
} |
字段 |
name |
string
注册令牌的名称,由服务器在创建过程中生成,格式为 enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId} 。
|
value |
string
传递给设备并授权设备进行注册的令牌值。此字段由服务器生成,是只读字段。
|
duration |
string (Duration format)
注册令牌的有效时长介于 1 分钟到 Durations.MAX_VALUE (大约 1 万年)之间。如果未指定,默认时长为 1 小时。请注意,如果请求的时长导致生成的 expirationTimestamp 超出 Timestamps.MAX_VALUE ,则 expirationTimestamp 会强制转换为 Timestamps.MAX_VALUE 。 该时长以秒为单位,最多包含九个小数位,以“s ”结尾。示例:"3.5s" 。
|
expirationTimestamp |
string (Timestamp format)
令牌的到期时间。此字段由服务器生成,是只读字段。 使用 RFC 3339,其中生成的输出将始终采用 Z 归一化,并使用 0、3、6 或 9 个小数位。也接受除“Z”以外的偏移量。示例:"2014-10-02T15:01:23Z" 、"2014-10-02T15:01:23.045123456Z" 或 "2014-10-02T15:01:23+05:30" 。
|
policyName |
string
最初应用于已注册设备的政策的名称,格式为 enterprises/{enterpriseId}/policies/{policyId} 。如果未指定,系统会应用设备用户的 policyName 。如果未指定 userName ,则默认应用 enterprises/{enterpriseId}/policies/default 。更新此字段时,您可以仅指定 policyId ,前提是 policyId 不包含任何斜线。系统会推断出政策名称的其余部分。
|
additionalData |
string
与注册令牌关联的任意可选数据。例如,这可能包含设备在注册后分配到的组织部门的 ID。设备使用令牌注册后,这些数据将显示在 Device 资源的 enrollmentTokenData 字段中。数据不得超过 1024 个字符;否则,创建请求将失败。
|
qrCode |
string
一个 JSON 字符串,其 UTF-8 表示法可用于生成二维码,以便使用此注册令牌注册设备。如需使用 NFC 注册设备,NFC 记录必须包含 JSON 中属性的序列化 java.util.Properties 表示法。
|
oneTimeOnly |
boolean
注册令牌是否仅限一次性使用。如果此标志设为 true,则只有一台设备可以使用此标志进行注册。
|
user (deprecated) |
object (User )
此字段已废弃,其值会被忽略。
|
allowPersonalUsage |
enum (AllowPersonalUsage )
控制是否允许在使用此注册令牌配置的设备上进行个人使用。 对于公司自有设备:
- 启用个人使用后,用户可以在设备上设置工作资料。
- 如需停用个人用途,用户需要将设备配置为完全受管设备。
对于个人所有的设备:
- 启用个人使用后,用户可以在设备上设置工作资料。
- 停用个人用途后,设备将无法预配。无法在个人所有的设备上停用个人使用。
|
方法 |
|
为给定企业创建注册令牌。 |
|
删除注册令牌。 |
|
获取有效且未过期的注册令牌。 |
|
列出给定企业的有效且未过期的注册令牌。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-02-19。
[null,null,["最后更新时间 (UTC):2025-02-19。"],[[["Enrollment tokens authorize devices to enroll and are valid for a specified duration."],["They can be configured with policies, additional data, and single-use restrictions."],["Enrollment tokens can be created, deleted, retrieved, and listed via API methods."],["Devices can be enrolled using the token value or a generated QR code."],["Personal usage can be controlled for devices provisioned with an enrollment token."]]],["Enrollment tokens, used to authorize device enrollment, have properties like `name`, `value`, `duration`, and `expirationTimestamp`. The `policyName` determines the initial policy, and `additionalData` stores arbitrary information. Tokens can be one-time use (`oneTimeOnly`) and have a `qrCode` for device enrollment. The `allowPersonalUsage` setting controls personal device usage. Available actions include creating, deleting, getting, and listing these tokens via associated methods. The `user` field is deprecated.\n"]]