Skip to content

Commit

Permalink
feat(frontier): replace an existing policy
Browse files Browse the repository at this point in the history
- ReplacePolicy will take an id of the existing policy and
replace it with the provided policy body.

Signed-off-by: Kush Sharma <[email protected]>
  • Loading branch information
kushsharma committed Nov 7, 2023
1 parent eb24a09 commit 4c0454a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions raystack/frontier/v1beta1/frontier.proto
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,18 @@ service FrontierService {
};
}

rpc ReplacePolicy(ReplacePolicyRequest) returns (ReplacePolicyResponse) {
option (google.api.http) = {
post: "/v1beta1/policies/{id}/replace",
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Policy";
summary: "Replace policy";
description: "Deletes an existing policy and create new.";
};
}

// Relations
rpc CreateRelation(CreateRelationRequest) returns (CreateRelationResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -2323,6 +2335,15 @@ message DeletePolicyRequest {

message DeletePolicyResponse {}

message ReplacePolicyRequest {
string id = 1;
PolicyRequestBody body = 2;
}

message ReplacePolicyResponse {
Policy policy = 1;
}

message RelationRequestBody {
reserved 2, 5;

Expand Down

0 comments on commit 4c0454a

Please sign in to comment.