Sets the access control policy for a resource. Replaces any existing policy.
HTTP request
POST https://contentwarehouse.googleapis.com/v1/{resource}:setAcl
Path parameters
Parameters | |
---|---|
resource |
Required. REQUIRED: The resource for which the policy is being requested. Format for document: projects/{projectNumber}/locations/{location}/documents/{documentId}. Format for collection: projects/{projectNumber}/locations/{location}/collections/{collectionId}. Format for project: projects/{projectNumber}. It takes the form |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "policy": { object ( |
Fields | |
---|---|
policy |
Required. REQUIRED: The complete policy to be applied to the You can set ACL with condition for projects only. Supported operators are: Boolean expressions (AND/OR) are supported up to 3 levels of nesting (for example, "((A AND B AND C) OR D) AND E"), a maximum of 10 comparisons are allowed in the expression. The expression must be < 6000 bytes in length. Sample condition: |
requestMetadata |
The meta information collected about the end user, used to enforce access control for the service. |
projectOwner |
For Set Project ACL only. Authorization check for end user will be ignored when projectOwner=true. |
Response body
If successful, the response body contains an instance of SetAclResponse
.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the resource
resource:
contentwarehouse.documents.setIamPolicy
For more information, see the IAM documentation.