Creates a project policy.
Operation description
Usage notes
-
Host consists of a project name and a Simple Log Service endpoint. You must specify a project in Host.
-
Alibaba Cloud Simple Log Service allows you to configure a project policy to authorize other users to access the specified Log Service resources.
- You must configure a project policy based on policy syntax. Before you configure a project policy, you must be familiar with the Action, Resource, and Condition parameters. For more information, see RAM .
- If you set the Principal element to an asterisk (*) and do not configure the Condition element when you configure a project policy, the policy applies to all users except for the project owner. If you set the Principal element to an asterisk (*) and configure the Condition element when you configure a project policy, the policy applies to all users including the project owner.
- You can configure multiple project policies for a project. The total size of the policies cannot exceed 16 KB.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request syntax
POST /policy HTTP/1.1
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
body | string | No | The project policy. | { "Version": "1", "Statement": [{ "Action": ["log:PostLogStoreLogs"], "Resource": "acs:log:*:*:project/exampleproject/*", "Effect": "Deny", "Condition": { "StringNotLike": { "acs:SourceVpc": ["vpc-*"] } } }] } |
Response parameters
Examples
Sample success responses
JSON
format
{}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|
No change history