Skip to content

Commit

Permalink
feat: Add authorized view bindings to Cloud Bigtable data APIs and me…
Browse files Browse the repository at this point in the history
…ssages

docs: The field `table_name` in message `.google.bigtable.v2.ReadRowsRequest` is changed from required to optional

docs: The field `table_name` in message `.google.bigtable.v2.SampleRowKeysRequest` is changed from required to optional

docs: The field `table_name` in message `.google.bigtable.v2.MutateRowRequest` is changed from required to optional

docs: The field `table_name` in message `.google.bigtable.v2.MutateRowsRequest` is changed from required to optional

docs: The field `table_name` in message `.google.bigtable.v2.CheckAndMutateRowRequest` is changed from required to optional

docs: The field `table_name` in message `.google.bigtable.v2.ReadModifyWriteRowRequest` is changed from required to optional
PiperOrigin-RevId: 612537984
  • Loading branch information
Google APIs authored and Copybara-Service committed Mar 4, 2024
1 parent c533283 commit 6465963
Showing 1 changed file with 148 additions and 15 deletions.
163 changes: 148 additions & 15 deletions google/bigtable/v2/bigtable.proto
Expand Up @@ -43,6 +43,10 @@ option (google.api.resource_definition) = {
type: "bigtableadmin.googleapis.com/Table"
pattern: "projects/{project}/instances/{instance}/tables/{table}"
};
option (google.api.resource_definition) = {
type: "bigtableadmin.googleapis.com/AuthorizedView"
pattern: "projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}"
};

// Service for reading from and writing to existing Bigtable tables.
service Bigtable {
Expand All @@ -64,13 +68,21 @@ service Bigtable {
option (google.api.http) = {
post: "/v2/{table_name=projects/*/instances/*/tables/*}:readRows"
body: "*"
additional_bindings {
post: "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readRows"
body: "*"
}
};
option (google.api.routing) = {
routing_parameters {
field: "table_name"
path_template: "{table_name=projects/*/instances/*/tables/*}"
}
routing_parameters { field: "app_profile_id" }
routing_parameters {
field: "authorized_view_name"
path_template: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}"
}
};
option (google.api.method_signature) = "table_name";
option (google.api.method_signature) = "table_name,app_profile_id";
Expand All @@ -84,13 +96,20 @@ service Bigtable {
returns (stream SampleRowKeysResponse) {
option (google.api.http) = {
get: "/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeys"
additional_bindings {
get: "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:sampleRowKeys"
}
};
option (google.api.routing) = {
routing_parameters {
field: "table_name"
path_template: "{table_name=projects/*/instances/*/tables/*}"
}
routing_parameters { field: "app_profile_id" }
routing_parameters {
field: "authorized_view_name"
path_template: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}"
}
};
option (google.api.method_signature) = "table_name";
option (google.api.method_signature) = "table_name,app_profile_id";
Expand All @@ -102,13 +121,21 @@ service Bigtable {
option (google.api.http) = {
post: "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow"
body: "*"
additional_bindings {
post: "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRow"
body: "*"
}
};
option (google.api.routing) = {
routing_parameters {
field: "table_name"
path_template: "{table_name=projects/*/instances/*/tables/*}"
}
routing_parameters { field: "app_profile_id" }
routing_parameters {
field: "authorized_view_name"
path_template: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}"
}
};
option (google.api.method_signature) = "table_name,row_key,mutations";
option (google.api.method_signature) =
Expand All @@ -122,13 +149,21 @@ service Bigtable {
option (google.api.http) = {
post: "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows"
body: "*"
additional_bindings {
post: "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRows"
body: "*"
}
};
option (google.api.routing) = {
routing_parameters {
field: "table_name"
path_template: "{table_name=projects/*/instances/*/tables/*}"
}
routing_parameters { field: "app_profile_id" }
routing_parameters {
field: "authorized_view_name"
path_template: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}"
}
};
option (google.api.method_signature) = "table_name,entries";
option (google.api.method_signature) = "table_name,entries,app_profile_id";
Expand All @@ -140,13 +175,21 @@ service Bigtable {
option (google.api.http) = {
post: "/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow"
body: "*"
additional_bindings {
post: "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:checkAndMutateRow"
body: "*"
}
};
option (google.api.routing) = {
routing_parameters {
field: "table_name"
path_template: "{table_name=projects/*/instances/*/tables/*}"
}
routing_parameters { field: "app_profile_id" }
routing_parameters {
field: "authorized_view_name"
path_template: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}"
}
};
option (google.api.method_signature) =
"table_name,row_key,predicate_filter,true_mutations,false_mutations";
Expand Down Expand Up @@ -182,13 +225,21 @@ service Bigtable {
option (google.api.http) = {
post: "/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow"
body: "*"
additional_bindings {
post: "/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readModifyWriteRow"
body: "*"
}
};
option (google.api.routing) = {
routing_parameters {
field: "table_name"
path_template: "{table_name=projects/*/instances/*/tables/*}"
}
routing_parameters { field: "app_profile_id" }
routing_parameters {
field: "authorized_view_name"
path_template: "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}"
}
};
option (google.api.method_signature) = "table_name,row_key,rules";
option (google.api.method_signature) =
Expand Down Expand Up @@ -243,16 +294,28 @@ message ReadRowsRequest {
REQUEST_STATS_FULL = 2;
}

// Required. The unique name of the table from which to read.
// Optional. The unique name of the table from which to read.
//
// Values are of the form
// `projects/<project>/instances/<instance>/tables/<table>`.
string table_name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = OPTIONAL,
(google.api.resource_reference) = {
type: "bigtableadmin.googleapis.com/Table"
}
];

// Optional. The unique name of the AuthorizedView from which to read.
//
// Values are of the form
// `projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>`.
string authorized_view_name = 9 [
(google.api.field_behavior) = OPTIONAL,
(google.api.resource_reference) = {
type: "bigtableadmin.googleapis.com/AuthorizedView"
}
];

// This value specifies routing for replication. If not specified, the
// "default" application profile will be used.
string app_profile_id = 5;
Expand Down Expand Up @@ -390,16 +453,29 @@ message ReadRowsResponse {

// Request message for Bigtable.SampleRowKeys.
message SampleRowKeysRequest {
// Required. The unique name of the table from which to sample row keys.
// Optional. The unique name of the table from which to sample row keys.
//
// Values are of the form
// `projects/<project>/instances/<instance>/tables/<table>`.
string table_name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = OPTIONAL,
(google.api.resource_reference) = {
type: "bigtableadmin.googleapis.com/Table"
}
];

// Optional. The unique name of the AuthorizedView from which to sample row
// keys.
//
// Values are of the form
// `projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>`.
string authorized_view_name = 4 [
(google.api.field_behavior) = OPTIONAL,
(google.api.resource_reference) = {
type: "bigtableadmin.googleapis.com/AuthorizedView"
}
];

// This value specifies routing for replication. If not specified, the
// "default" application profile will be used.
string app_profile_id = 2;
Expand All @@ -425,16 +501,30 @@ message SampleRowKeysResponse {

// Request message for Bigtable.MutateRow.
message MutateRowRequest {
// Required. The unique name of the table to which the mutation should be
// applied. Values are of the form
// Optional. The unique name of the table to which the mutation should be
// applied.
//
// Values are of the form
// `projects/<project>/instances/<instance>/tables/<table>`.
string table_name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = OPTIONAL,
(google.api.resource_reference) = {
type: "bigtableadmin.googleapis.com/Table"
}
];

// Optional. The unique name of the AuthorizedView to which the mutation
// should be applied.
//
// Values are of the form
// `projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>`.
string authorized_view_name = 6 [
(google.api.field_behavior) = OPTIONAL,
(google.api.resource_reference) = {
type: "bigtableadmin.googleapis.com/AuthorizedView"
}
];

// This value specifies routing for replication. If not specified, the
// "default" application profile will be used.
string app_profile_id = 4;
Expand Down Expand Up @@ -464,15 +554,30 @@ message MutateRowsRequest {
repeated Mutation mutations = 2 [(google.api.field_behavior) = REQUIRED];
}

// Required. The unique name of the table to which the mutations should be
// Optional. The unique name of the table to which the mutations should be
// applied.
//
// Values are of the form
// `projects/<project>/instances/<instance>/tables/<table>`.
string table_name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = OPTIONAL,
(google.api.resource_reference) = {
type: "bigtableadmin.googleapis.com/Table"
}
];

// Optional. The unique name of the AuthorizedView to which the mutations
// should be applied.
//
// Values are of the form
// `projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>`.
string authorized_view_name = 5 [
(google.api.field_behavior) = OPTIONAL,
(google.api.resource_reference) = {
type: "bigtableadmin.googleapis.com/AuthorizedView"
}
];

// This value specifies routing for replication. If not specified, the
// "default" application profile will be used.
string app_profile_id = 3;
Expand Down Expand Up @@ -533,16 +638,30 @@ message RateLimitInfo {

// Request message for Bigtable.CheckAndMutateRow.
message CheckAndMutateRowRequest {
// Required. The unique name of the table to which the conditional mutation
// should be applied. Values are of the form
// Optional. The unique name of the table to which the conditional mutation
// should be applied.
//
// Values are of the form
// `projects/<project>/instances/<instance>/tables/<table>`.
string table_name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = OPTIONAL,
(google.api.resource_reference) = {
type: "bigtableadmin.googleapis.com/Table"
}
];

// Optional. The unique name of the AuthorizedView to which the conditional
// mutation should be applied.
//
// Values are of the form
// `projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>`.
string authorized_view_name = 9 [
(google.api.field_behavior) = OPTIONAL,
(google.api.resource_reference) = {
type: "bigtableadmin.googleapis.com/AuthorizedView"
}
];

// This value specifies routing for replication. If not specified, the
// "default" application profile will be used.
string app_profile_id = 7;
Expand Down Expand Up @@ -601,16 +720,30 @@ message PingAndWarmResponse {}

// Request message for Bigtable.ReadModifyWriteRow.
message ReadModifyWriteRowRequest {
// Required. The unique name of the table to which the read/modify/write rules
// should be applied. Values are of the form
// Optional. The unique name of the table to which the read/modify/write rules
// should be applied.
//
// Values are of the form
// `projects/<project>/instances/<instance>/tables/<table>`.
string table_name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = OPTIONAL,
(google.api.resource_reference) = {
type: "bigtableadmin.googleapis.com/Table"
}
];

// Optional. The unique name of the AuthorizedView to which the
// read/modify/write rules should be applied.
//
// Values are of the form
// `projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>`.
string authorized_view_name = 6 [
(google.api.field_behavior) = OPTIONAL,
(google.api.resource_reference) = {
type: "bigtableadmin.googleapis.com/AuthorizedView"
}
];

// This value specifies routing for replication. If not specified, the
// "default" application profile will be used.
string app_profile_id = 4;
Expand Down

0 comments on commit 6465963

Please sign in to comment.