108 lines
3.2 KiB
Protocol Buffer
108 lines
3.2 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package controller.api.resources.roles.v1;
|
|
|
|
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/resources/roles;roles";
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
import "google/protobuf/wrappers.proto";
|
|
import "controller/api/resources/scopes/v1/scope.proto";
|
|
import "controller/custom_options/v1/options.proto";
|
|
|
|
message Principal {
|
|
// The ID of the principal.
|
|
// Output only.
|
|
string id = 1;
|
|
|
|
// The type of the principal.
|
|
// Output only.
|
|
string type = 2;
|
|
|
|
// The scope ID of the principal.
|
|
// Output only.
|
|
string scope_id = 3 [json_name="scope_id"];
|
|
}
|
|
|
|
message GrantJson {
|
|
// The ID, if set.
|
|
// Output only.
|
|
string id = 1;
|
|
|
|
// The type, if set.
|
|
// Output only.
|
|
string type = 2;
|
|
|
|
// The actions.
|
|
// Output only.
|
|
repeated string actions = 3;
|
|
}
|
|
|
|
message Grant {
|
|
// The original user-supplied string.
|
|
// Output only.
|
|
string raw = 1;
|
|
|
|
// The canonically formatted string.
|
|
// Output only.
|
|
string canonical = 2;
|
|
|
|
// The JSON representation of the grant.
|
|
// Output only.
|
|
GrantJson json = 3;
|
|
}
|
|
|
|
// Role contains all fields related to a Role resource
|
|
message Role {
|
|
// The ID of the Role
|
|
// Output only.
|
|
string id = 10;
|
|
|
|
// The id of the scope this resource is in.
|
|
string scope_id = 20 [json_name="scope_id"];
|
|
|
|
// Scope information for this resource
|
|
// Output only.
|
|
resources.scopes.v1.ScopeInfo scope = 30;
|
|
|
|
// Optional name for identification purposes
|
|
google.protobuf.StringValue name = 40 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
|
|
|
|
// Optional user-set description for identification purposes
|
|
google.protobuf.StringValue description = 50 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"description" that: "description"}];
|
|
|
|
// The time this resource was created
|
|
// Output only.
|
|
google.protobuf.Timestamp created_time = 60 [json_name="created_time"];
|
|
|
|
// The time this resource was last updated.
|
|
// Output only.
|
|
google.protobuf.Timestamp updated_time = 70 [json_name="updated_time"];
|
|
|
|
// The version can be used in subsequent write requests to ensure this resource
|
|
// has not changed and to fail the write if it has.
|
|
uint32 version = 80;
|
|
|
|
// The scope the grants will apply to. If the role is at the global scope,
|
|
// this can be an org or project. If the role is at an org
|
|
// scope, this can be a project within the org. It is invalid for
|
|
// this to be anything other than the role's scope when the role's scope is
|
|
// a project.
|
|
google.protobuf.StringValue grant_scope_id = 90 [json_name="grant_scope_id", (custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"grant_scope_id" that: "GrantScopeId"}];
|
|
|
|
// The IDs (only) of principals that are assigned to this role.
|
|
// Output only.
|
|
repeated string principal_ids = 100 [json_name="principal_ids"];
|
|
|
|
// The principals that are assigned to this role.
|
|
// Output only.
|
|
repeated Principal principals = 110;
|
|
|
|
// The grants that this role provides for its principals.
|
|
// Output only.
|
|
repeated string grant_strings = 120 [json_name="grant_strings"];
|
|
|
|
// The parsed grant information.
|
|
// Output only.
|
|
repeated Grant grants = 130;
|
|
}
|