- What's New
- Billing
- Service Overview
- Getting Started
-
User Guide
- Getting Started with EG
- Permissions Management
- Event Sources
- Event Channels
- Event Subscriptions
- Event Streams
- Events
- Event Rules
- Event Targets
- Network Management
- IAM Projects and Enterprise Projects
- Authorization
- Event Monitoring
- Auditing
-
FAQs
- How Is EG Billed?
- Why Did My Event Source Creation Fail?
- How Do I Configure a Security Group When Creating an Event Source?
- Why Did My Event Publishing Fail?
- Why Was the Target Not Triggered?
- Can I Push Custom Events to EG?
- How Do I Filter Events to Transmit to the Target?
- How Do I Transfer Custom Event Content to the Target?
- How Do I Obtain the SASL Certificate Address of a DMS for Kafka Instance?
- SDK Reference
- General Reference
Show all
Copied.
Custom Policies
Custom policies can be created to supplement the system-defined policies of EG.
You can create custom policies in either of the following ways:
- Visual editor: Select cloud services, actions, resources, and request conditions. This does not require knowledge of policy syntax.
- JSON: Edit policies from scratch or based on an existing policy in JSON format.
For details, see Creating a Custom Policy. The following section contains examples of common EG custom policies.
Example Custom Policies
- Example 1: Allow user to delete event sources
{ "Version": "1.1", "Statement": [ { "Effect": "Allow", "Action": [ " eg:sources:delete eg:sources:list " ] } ] }
- Example 2: Deny event source deletion
A policy with only "Deny" permissions must be used in conjunction with other policies to take effect. If the permissions assigned to a user include both "Allow" and "Deny", the "Deny" permissions take precedence over the "Allow" permissions.
The following method can be used if you need to assign permissions of the EG FullAccess policy to a user but also forbid the user from deleting event sources. Create a custom policy to disallow event source deletion and assign both policies to the group the user belongs to. Then the user can perform all operations on EG except deleting event sources. The following is an example of a deny policy:
{ "Version": "1.1", "Statement": [ { "Effect": "Deny", "Action": [ "eg:sources:delete" ] } ] }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot