flyrain commented on code in PR #808:
URL: https://github.com/apache/polaris/pull/808#discussion_r1943839945


##########
spec/generated/bundled-polaris-catalog-service.yaml:
##########
@@ -1359,6 +1359,269 @@ paths:
           $ref: '#/components/responses/ServiceUnavailableResponse'
         5XX:
           $ref: '#/components/responses/ServerErrorResponse'
+  /v1/{prefix}/namespaces/{namespace}/policies:
+    parameters:
+      - $ref: '#/components/parameters/prefix'
+      - $ref: '#/components/parameters/namespace'
+    post:
+      tags:
+        - Catalog API
+      summary: Create a policy in the given namespace
+      operationId: createPolicy
+      description: |
+        Creates a policy within the specified namespace.
+
+        A policy defines a set of rules governing actions on specified 
resources under predefined conditions.
+        In Apache Polaris, policies are created, stored, and later referenced 
by external engines to enforce access controls on associated resources.
+
+        User provides the following inputs when creating a policy
+        - `name`(REQUIRED): The name of the policy. It Must include only 
unreserved URL characters: letters(A-Z, a-z), digits (0-9), hyphens (-), 
periods (.), underscores (_) and tildes (~)
+        - `type` (REQUIRED): The type of the policy. It can be either 
predefined type or custom type.
+          - **Predefined Policies:** system.compaction, 
system.snapshot_retention
+          - **Custom Policies:** custom.<org_name>.data_masking, 
custom.<user_id>.audit_policy

Review Comment:
   Sorry for the confusion, I think we should just make sure policy name 
doesn't have dot. policy type is fine.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@polaris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to