Error
A valid request URL is required to generate request examples{
"srn": "srn2:policy#my-read-only-policy",
"name": "my-read-only-policy",
"description": "Policy allowing query on myTable",
"policyDocumentJson": "{\"version\":\"v1\",\"statements\":[{\"effect\":\"allow\",\"actions\":[\"query\"],\"resources\":[\"srn2:cluster#*:table#myTable\"]}]}",
"createdAt": "2024-09-04T00:28:30.876+00:00",
"lastUpdatedAt": "2024-09-04T00:28:30.876+00:00",
"createdBy": "srn:zone:user:default:abcd1234",
"lastUpdatedBy": "srn:zone:user:default:abcd1234"
}{
"timestamp": "2023-11-07T05:31:56Z",
"status": 404,
"error": "Not Found",
"message": "Not Found.",
"path": "/api/v1/rbac-manager/policies/srn2:policy%23missing"
}{
"timestamp": "2023-11-07T05:31:56Z",
"status": 404,
"error": "Not Found",
"message": "Not Found.",
"path": "/api/v1/rbac-manager/policies/srn2:policy%23missing"
}{
"timestamp": "2023-11-07T05:31:56Z",
"status": 404,
"error": "Not Found",
"message": "Not Found.",
"path": "/api/v1/rbac-manager/policies/srn2:policy%23missing"
}Policies
Create a policy
Creates a policy. The policy document is passed as a JSON string in policyDocumentJson.
See Custom Policy Configuration for the document format,
the list of actions, and SRN syntax.
POST
/
policies
Error
A valid request URL is required to generate request examples{
"srn": "srn2:policy#my-read-only-policy",
"name": "my-read-only-policy",
"description": "Policy allowing query on myTable",
"policyDocumentJson": "{\"version\":\"v1\",\"statements\":[{\"effect\":\"allow\",\"actions\":[\"query\"],\"resources\":[\"srn2:cluster#*:table#myTable\"]}]}",
"createdAt": "2024-09-04T00:28:30.876+00:00",
"lastUpdatedAt": "2024-09-04T00:28:30.876+00:00",
"createdBy": "srn:zone:user:default:abcd1234",
"lastUpdatedBy": "srn:zone:user:default:abcd1234"
}{
"timestamp": "2023-11-07T05:31:56Z",
"status": 404,
"error": "Not Found",
"message": "Not Found.",
"path": "/api/v1/rbac-manager/policies/srn2:policy%23missing"
}{
"timestamp": "2023-11-07T05:31:56Z",
"status": 404,
"error": "Not Found",
"message": "Not Found.",
"path": "/api/v1/rbac-manager/policies/srn2:policy%23missing"
}{
"timestamp": "2023-11-07T05:31:56Z",
"status": 404,
"error": "Not Found",
"message": "Not Found.",
"path": "/api/v1/rbac-manager/policies/srn2:policy%23missing"
}Authorizations
Body
application/json
The policy document as a JSON string (escape the inner quotes). See Custom Policy Configuration for the format.
Example:
"{\"version\":\"v1\",\"statements\":[{\"effect\":\"allow\",\"actions\":[\"query\"],\"resources\":[\"srn2:cluster#*:table#myTable\"]}]}"
Response
The created policy.
The policy document as a JSON string (escape the inner quotes). See Custom Policy Configuration for the format.
Example:
"{\"version\":\"v1\",\"statements\":[{\"effect\":\"allow\",\"actions\":[\"query\"],\"resources\":[\"srn2:cluster#*:table#myTable\"]}]}"
Was this page helpful?

