Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(frontier): replace an existing policy #318

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading