Skip to content

Commit fb2728d

Browse files
committed
feat(frontier): replace an existing policy
- ReplacePolicy will take an id of the existing policy and replace it with the provided policy body. Signed-off-by: Kush Sharma <[email protected]>
1 parent eb24a09 commit fb2728d

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

raystack/frontier/v1beta1/frontier.proto

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,18 @@ service FrontierService {
951951
};
952952
}
953953

954+
rpc ReplacePolicy(ReplacePolicyRequest) returns (ReplacePolicyResponse) {
955+
option (google.api.http) = {
956+
post: "/v1beta1/policies/{id}/replace",
957+
body: "*"
958+
};
959+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
960+
tags: "Policy";
961+
summary: "Replace policy";
962+
description: "Deletes an existing policy and create new.";
963+
};
964+
}
965+
954966
// Relations
955967
rpc CreateRelation(CreateRelationRequest) returns (CreateRelationResponse) {
956968
option (google.api.http) = {
@@ -2323,6 +2335,13 @@ message DeletePolicyRequest {
23232335

23242336
message DeletePolicyResponse {}
23252337

2338+
message ReplacePolicyRequest {
2339+
string id = 1;
2340+
PolicyRequestBody body = 2;
2341+
}
2342+
2343+
message ReplacePolicyResponse {}
2344+
23262345
message RelationRequestBody {
23272346
reserved 2, 5;
23282347

0 commit comments

Comments
 (0)