@@ -164,7 +164,8 @@ service FirestoreAdmin {
164164 // only supports listing fields that have been explicitly overridden. To issue
165165 // this query, call
166166 // [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]
167- // with the filter set to `indexConfig.usesAncestorConfig:false` .
167+ // with the filter set to `indexConfig.usesAncestorConfig:false or
168+ // `ttlConfig:*`.
168169 rpc ListFields (ListFieldsRequest ) returns (ListFieldsResponse ) {
169170 option (google.api.http ) = {
170171 get : "/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields"
@@ -257,6 +258,19 @@ service FirestoreAdmin {
257258 metadata_type : "UpdateDatabaseMetadata"
258259 };
259260 }
261+
262+ // Deletes a database.
263+ rpc DeleteDatabase (DeleteDatabaseRequest )
264+ returns (google.longrunning.Operation ) {
265+ option (google.api.http ) = {
266+ delete : "/v1/{name=projects/*/databases/*}"
267+ };
268+ option (google.api.method_signature ) = "name" ;
269+ option (google.longrunning.operation_info ) = {
270+ response_type : "Database"
271+ metadata_type : "DeleteDatabaseMetadata"
272+ };
273+ }
260274}
261275
262276// A request to list the Firestore Databases in all locations for a project.
@@ -289,7 +303,11 @@ message CreateDatabaseRequest {
289303 // Required. The ID to use for the database, which will become the final
290304 // component of the database's resource name.
291305 //
292- // The value must be set to "(default)".
306+ // This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/
307+ // with first character a letter and the last a letter or a number. Must not
308+ // be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/.
309+ //
310+ // "(default)" database id is also valid.
293311 string database_id = 3 [(google.api.field_behavior ) = REQUIRED ];
294312}
295313
@@ -300,6 +318,17 @@ message CreateDatabaseMetadata {}
300318message ListDatabasesResponse {
301319 // The databases in the project.
302320 repeated Database databases = 1 ;
321+
322+ // In the event that data about individual databases cannot be listed they
323+ // will be recorded here.
324+ //
325+ // An example entry might be: projects/some_project/locations/some_location
326+ // This can happen if the Cloud Region that the Database resides in is
327+ // currently unavailable. In this case we can't fetch all the details about
328+ // the database. You may be able to get a more detailed error message
329+ // (or possibly fetch the resource) by sending a 'Get' request for the
330+ // resource or a 'List' request for the specific location.
331+ repeated string unreachable = 3 ;
303332}
304333
305334// The request for
@@ -328,6 +357,27 @@ message UpdateDatabaseRequest {
328357// Metadata related to the update database operation.
329358message UpdateDatabaseMetadata {}
330359
360+ // The request for
361+ // [FirestoreAdmin.DeleteDatabase][google.firestore.admin.v1.FirestoreAdmin.DeleteDatabase].
362+ message DeleteDatabaseRequest {
363+ // Required. A name of the form
364+ // `projects/{project_id}/databases/{database_id}`
365+ string name = 1 [
366+ (google.api.field_behavior ) = REQUIRED ,
367+ (google.api.resource_reference ) = {
368+ type : "firestore.googleapis.com/Database"
369+ }
370+ ];
371+
372+ // The current etag of the Database.
373+ // If an etag is provided and does not match the current etag of the database,
374+ // deletion will be blocked and a FAILED_PRECONDITION error will be returned.
375+ string etag = 3 ;
376+ }
377+
378+ // Metadata related to the delete database operation.
379+ message DeleteDatabaseMetadata {}
380+
331381// The request for
332382// [FirestoreAdmin.CreateIndex][google.firestore.admin.v1.FirestoreAdmin.CreateIndex].
333383message CreateIndexRequest {
@@ -488,7 +538,7 @@ message ExportDocumentsRequest {
488538 // generated based on the start time.
489539 string output_uri_prefix = 3 ;
490540
491- // Unspecified means all namespaces. This is the preferred
541+ // An empty list represents all namespaces. This is the preferred
492542 // usage for databases that don't use namespaces.
493543 //
494544 // An empty string element represents the default namespace. This should be
@@ -529,7 +579,7 @@ message ImportDocumentsRequest {
529579 // [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix].
530580 string input_uri_prefix = 3 ;
531581
532- // Unspecified means all namespaces. This is the preferred
582+ // An empty list represents all namespaces. This is the preferred
533583 // usage for databases that don't use namespaces.
534584 //
535585 // An empty string element represents the default namespace. This should be
0 commit comments