Skip to content

Commit

Permalink
fix: target new spanner db admin service config (#1685)
Browse files Browse the repository at this point in the history
* feat: Add ListDatabaseRoles API to support role based access control

PiperOrigin-RevId: 462086058

Source-Link: googleapis/googleapis@4f072bf

Source-Link: googleapis/googleapis-gen@06f699d
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDZmNjk5ZGE2NmY3YTA3Yjk1NDFlNTdhN2QwMzg2M2I0ZGY0OTcxYyJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* fix: target new spanner db admin service config

chore: remove old spanner db admin service config
PiperOrigin-RevId: 463110616

Source-Link: googleapis/googleapis@0f38696

Source-Link: googleapis/googleapis-gen@b048ca6
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjA0OGNhNjQ3ZTExZmM5MmQ1YmNmMGJlYzE4ODFkMjVmMzIxZGVhOSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Astha Mohta <[email protected]>
  • Loading branch information
3 people authored Aug 2, 2022
1 parent 2839d23 commit 2495c07
Show file tree
Hide file tree
Showing 7 changed files with 2,314 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ service DatabaseAdmin {
post: "/v1/{resource=projects/*/instances/*/backups/*}:testIamPermissions"
body: "*"
}
additional_bindings {
post: "/v1/{resource=projects/*/instances/*/databases/*/databaseRoles/*}:testIamPermissions"
body: "*"
}
};
option (google.api.method_signature) = "resource,permissions";
}
Expand Down Expand Up @@ -334,6 +338,14 @@ service DatabaseAdmin {
};
option (google.api.method_signature) = "parent";
}

// Lists Cloud Spanner database roles.
rpc ListDatabaseRoles(ListDatabaseRolesRequest) returns (ListDatabaseRolesResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/instances/*/databases/*}/databaseRoles"
};
option (google.api.method_signature) = "parent";
}
}

// Information about the database restore.
Expand Down Expand Up @@ -868,3 +880,51 @@ enum RestoreSourceType {
// A backup was used as the source of the restore.
BACKUP = 1;
}

// A Cloud Spanner database role.
message DatabaseRole {
option (google.api.resource) = {
type: "spanner.googleapis.com/DatabaseRole"
pattern: "projects/{project}/instances/{instance}/databases/{database}/databaseRoles/{role}"
};

// Required. The name of the database role. Values are of the form
// `projects/<project>/instances/<instance>/databases/<database>/databaseRoles/
// {role}`, where `<role>` is as specified in the `CREATE ROLE`
// DDL statement. This name can be passed to Get/Set IAMPolicy methods to
// identify the database role.
string name = 1 [(google.api.field_behavior) = REQUIRED];
}

// The request for [ListDatabaseRoles][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseRoles].
message ListDatabaseRolesRequest {
// Required. The database whose roles should be listed.
// Values are of the form
// `projects/<project>/instances/<instance>/databases/<database>/databaseRoles`.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "spanner.googleapis.com/Database"
}
];

// Number of database roles to be returned in the response. If 0 or less,
// defaults to the server's maximum allowed page size.
int32 page_size = 2;

// If non-empty, `page_token` should contain a
// [next_page_token][google.spanner.admin.database.v1.ListDatabaseRolesResponse.next_page_token] from a
// previous [ListDatabaseRolesResponse][google.spanner.admin.database.v1.ListDatabaseRolesResponse].
string page_token = 3;
}

// The response for [ListDatabaseRoles][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseRoles].
message ListDatabaseRolesResponse {
// Database roles that matched the request.
repeated DatabaseRole database_roles = 1;

// `next_page_token` can be sent in a subsequent
// [ListDatabaseRoles][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabaseRoles]
// call to fetch more of the matching roles.
string next_page_token = 2;
}
309 changes: 309 additions & 0 deletions protos/protos.d.ts

Large diffs are not rendered by default.

683 changes: 683 additions & 0 deletions protos/protos.js

Large diffs are not rendered by default.

82 changes: 77 additions & 5 deletions protos/protos.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2495c07

Please sign in to comment.