Serviceaccountkeys: insert

为与此企业关联的服务帐号生成新凭据。调用服务帐号必须通过调用 Enterprises.GetServiceAccount 检索,并且必须通过调用 Enterprises.SetAccount 设置为企业服务帐号。

只有要插入的资源中的键类型才会填充。

请求

HTTP 请求

POST https://www.googleapis.com/androidenterprise/v1/enterprises/enterpriseId/serviceAccountKeys

参数

参数名称 说明
路径参数
enterpriseId string 企业 ID。

授权

此请求需要获得以下范围的授权:

范围
https://www.googleapis.com/auth/androidenterprise

如需了解详情,请参阅身份验证和授权页面。

请求正文

在请求正文中,提供具有以下属性的 Serviceaccountkeys 资源

属性名称 说明 备注
必需属性
type string 生成的密钥数据的文件格式。

可接受的值:
  • googleCredentials
  • pkcs12

响应

如果成功,此方法将在响应正文中返回 Serviceaccountkeys 资源