Serviceaccountkeys

有关此类资源的方法列表,请参阅本页面的结尾部分。

资源表示形式

可用于以服务账号身份进行身份验证的凭据。

{
  "kind": "androidenterprise#serviceAccountKey",
  "id": string,
  "type": string,
  "data": string,
  "publicData": string
}
属性名称 说明 备注
data string 私钥凭据文件的正文,采用字符串格式。此字段仅在创建 ServiceAccountKey 时填充,Google 不会存储此字段。当 type 为“pkcs12”时,data 字段的内容采用 base64 编码,并且密码为“notasecret”。
id string 此 ServiceAccountKey 的不透明唯一标识符。由服务器分配。
kind string
publicData string 凭据文件的公钥数据。这是 X.509 证书。如果您使用的是 googleCredentials 密钥类型,则此字段与使用凭据文件中的 X.509 证书网址检索到的证书相同。
type string 生成的密钥数据的文件格式。

可接受的值包括:
  • googleCredentials
  • pkcs12

方法

delete
移除并使与此企业关联的服务账号的指定凭据失效。调用服务账号必须通过调用 Enterprises.GetServiceAccount 检索,并且必须通过调用 Enterprises.SetAccount 设置为企业服务账号。
insert
为与此企业关联的服务账号生成新凭据。调用服务账号必须通过调用 Enterprises.GetServiceAccount 检索,并且必须通过调用 Enterprises.SetAccount 设置为企业服务账号。

在要插入的资源中,只能填充密钥的类型。
list
列出与此企业关联的服务账号的所有有效凭据。系统只会返回 ID 和密钥类型。调用服务账号必须通过调用 Enterprises.GetServiceAccount 检索,并且必须通过调用 Enterprises.SetAccount 设置为企业服务账号。