Skip to content

Commit

Permalink
feat(guardian): add api to list default roels while provider creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Chief-Rishab committed Nov 26, 2023
1 parent 328b1ec commit a1e717c
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions raystack/guardian/v1beta1/guardian.proto
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,15 @@ service GuardianService {
};
}

rpc GetProviderRoles(GetProviderRolesRequest) returns (GetProviderRolesResponse) {
option (google.api.http) = {get: "/v1beta1/providers/{name}/roles"};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
tags: "Providers";
summary: "Get Provider Default Roles";
description: "Get Provider Roles returns a list of roles supported by a provider while creating a new provider";
};
}

rpc CreateProvider(CreateProviderRequest) returns (CreateProviderResponse) {
option (google.api.http) = {
post: "/v1beta1/providers"
Expand Down Expand Up @@ -551,6 +560,24 @@ message GetProviderTypesResponse {
repeated ProviderType provider_types = 1;
}

message GetProviderRolesRequest {
string name = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) =
{description: "Name of the provider"}
];
string resource_type = 2 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) =
{description: "Resource type for which the roles are to be fetched"}
];
}

message GetProviderRolesResponse {
repeated string roles = 1 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) =
{description: "List of roles supported by the provider"}
];
}

message CreateProviderRequest {
ProviderConfig config = 1;
bool dry_run = 2;
Expand Down

0 comments on commit a1e717c

Please sign in to comment.