Method: policies.set
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
设置对指定资源的访问权限控制政策。替换任何现有政策。
HTTP 请求
POST https://sasportal.googleapis.com/v1alpha1/policies:set
网址采用 gRPC 转码语法。
请求正文
请求正文中包含结构如下的数据:
JSON 表示法 |
{
"resource": string,
"policy": {
object (Policy )
},
"disableNotification": boolean
} |
字段 |
resource |
string
必需。要为其指定政策的资源。此政策会替换任何现有政策。
|
policy |
object (Policy )
必需。要应用于 resource 的政策。
|
disableNotification |
boolean
可选。将该字段设置为 true 可停用初始配置通知。
|
响应正文
如果成功,则响应正文包含一个 Policy
实例。
授权作用域
需要以下 OAuth 范围:
https://www.googleapis.com/auth/sasportal
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[],["The core function is to set an access control policy on a resource via a `POST` HTTP request to `https://sasportal.googleapis.com/v1alpha1/policies:set`. The request body, in JSON format, requires a `resource` string and a `policy` object. Optionally, `disableNotification` can be set to `true`. A successful request returns a `Policy` instance. This process requires the `https://www.googleapis.com/auth/sasportal` OAuth scope. Existing policies are replaced.\n"],null,[]]