Skip to content

Commit d2f35e8

Browse files
feat(firestore): update the api
#### firestore:v1 The following keys were added: - resources.projects.resources.databases.methods.clone (Total Keys: 12) - schemas.GoogleFirestoreAdminV1CloneDatabaseMetadata (Total Keys: 10) - schemas.GoogleFirestoreAdminV1CloneDatabaseRequest (Total Keys: 7) - schemas.GoogleFirestoreAdminV1PitrSnapshot (Total Keys: 8) #### firestore:v1beta1 The following keys were added: - schemas.GoogleFirestoreAdminV1CloneDatabaseMetadata (Total Keys: 10) - schemas.GoogleFirestoreAdminV1PitrSnapshot (Total Keys: 8) #### firestore:v1beta2 The following keys were added: - schemas.GoogleFirestoreAdminV1CloneDatabaseMetadata (Total Keys: 10) - schemas.GoogleFirestoreAdminV1PitrSnapshot (Total Keys: 8)
1 parent 7352f76 commit d2f35e8

File tree

4 files changed

+345
-3
lines changed

4 files changed

+345
-3
lines changed

docs/dyn/firestore_v1.projects.databases.html

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ <h2>Instance Methods</h2>
102102
<p class="toc_element">
103103
<code><a href="#bulkDeleteDocuments">bulkDeleteDocuments(name, body=None, x__xgafv=None)</a></code></p>
104104
<p class="firstline">Bulk deletes a subset of documents from Google Cloud Firestore. Documents created or updated after the underlying system starts to process the request will not be deleted. The bulk delete occurs in the background and its progress can be monitored and managed via the Operation resource that is created. For more details on bulk delete behavior, refer to: https://cloud.google.com/firestore/docs/manage-data/bulk-delete</p>
105+
<p class="toc_element">
106+
<code><a href="#clone">clone(parent, body=None, x__xgafv=None)</a></code></p>
107+
<p class="firstline">Creates a new database by cloning an existing one. The new database must be in the same cloud region or multi-region location as the existing database. This behaves similar to FirestoreAdmin.CreateDatabase except instead of creating a new empty database, a new database is created with the database type, index configuration, and documents from an existing database. The long-running operation can be used to track the progress of the clone, with the Operation's metadata field type being the CloneDatabaseMetadata. The response type is the Database if the clone was successful. The new database is not readable or writeable until the LRO has completed.</p>
105108
<p class="toc_element">
106109
<code><a href="#close">close()</a></code></p>
107110
<p class="firstline">Close httplib2 connections.</p>
@@ -177,6 +180,65 @@ <h3>Method Details</h3>
177180
}</pre>
178181
</div>
179182

183+
<div class="method">
184+
<code class="details" id="clone">clone(parent, body=None, x__xgafv=None)</code>
185+
<pre>Creates a new database by cloning an existing one. The new database must be in the same cloud region or multi-region location as the existing database. This behaves similar to FirestoreAdmin.CreateDatabase except instead of creating a new empty database, a new database is created with the database type, index configuration, and documents from an existing database. The long-running operation can be used to track the progress of the clone, with the Operation&#x27;s metadata field type being the CloneDatabaseMetadata. The response type is the Database if the clone was successful. The new database is not readable or writeable until the LRO has completed.
186+
187+
Args:
188+
parent: string, Required. The project to clone the database in. Format is `projects/{project_id}`. (required)
189+
body: object, The request body.
190+
The object takes the form of:
191+
192+
{ # The request message for FirestoreAdmin.CloneDatabase.
193+
&quot;databaseId&quot;: &quot;A String&quot;, # Required. The ID to use for the database, which will become the final component of the database&#x27;s resource name. This database ID must not be associated with an existing database. This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. &quot;(default)&quot; database ID is also valid.
194+
&quot;encryptionConfig&quot;: { # Encryption configuration for a new database being created from another source. The source could be a Backup . # Optional. Encryption configuration for the cloned database. If this field is not specified, the cloned database will use the same encryption configuration as the source database, namely use_source_encryption.
195+
&quot;customerManagedEncryption&quot;: { # The configuration options for using CMEK (Customer Managed Encryption Key) encryption. # Use Customer Managed Encryption Keys (CMEK) for encryption.
196+
&quot;kmsKeyName&quot;: &quot;A String&quot;, # Required. Only keys in the same location as the database are allowed to be used for encryption. For Firestore&#x27;s nam5 multi-region, this corresponds to Cloud KMS multi-region us. For Firestore&#x27;s eur3 multi-region, this corresponds to Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations. The expected format is `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
197+
},
198+
&quot;googleDefaultEncryption&quot;: { # The configuration options for using Google default encryption. # Use Google default encryption.
199+
},
200+
&quot;useSourceEncryption&quot;: { # The configuration options for using the same encryption method as the source. # The database will use the same encryption configuration as the source.
201+
},
202+
},
203+
&quot;pitrSnapshot&quot;: { # A consistent snapshot of a database at a specific point in time. A PITR (Point-in-time recovery) snapshot with previous versions of a database&#x27;s data is available for every minute up to the associated database&#x27;s data retention period. If the PITR feature is enabled, the retention period is 7 days; otherwise, it is one hour. # Required. Specification of the PITR data to clone from. The source database must exist. The cloned database will be created in the same location as the source database.
204+
&quot;database&quot;: &quot;A String&quot;, # Required. The name of the database that this was a snapshot of. Format: `projects/{project}/databases/{database}`.
205+
&quot;databaseUid&quot;: &quot;A String&quot;, # Output only. Public UUID of the database the snapshot was associated with.
206+
&quot;snapshotTime&quot;: &quot;A String&quot;, # Required. Snapshot time of the database.
207+
},
208+
&quot;tags&quot;: { # Optional. Immutable. Tags to be bound to the cloned database. The tags should be provided in the format of `tagKeys/{tag_key_id} -&gt; tagValues/{tag_value_id}`.
209+
&quot;a_key&quot;: &quot;A String&quot;,
210+
},
211+
}
212+
213+
x__xgafv: string, V1 error format.
214+
Allowed values
215+
1 - v1 error format
216+
2 - v2 error format
217+
218+
Returns:
219+
An object of the form:
220+
221+
{ # This resource represents a long-running operation that is the result of a network API call.
222+
&quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
223+
&quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
224+
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
225+
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
226+
{
227+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
228+
},
229+
],
230+
&quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
231+
},
232+
&quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
233+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
234+
},
235+
&quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
236+
&quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
237+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
238+
},
239+
}</pre>
240+
</div>
241+
180242
<div class="method">
181243
<code class="details" id="close">close()</code>
182244
<pre>Close httplib2 connections.</pre>

googleapiclient/discovery_cache/documents/firestore.v1.json

Lines changed: 131 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,35 @@
141141
"https://www.googleapis.com/auth/datastore"
142142
]
143143
},
144+
"clone": {
145+
"description": "Creates a new database by cloning an existing one. The new database must be in the same cloud region or multi-region location as the existing database. This behaves similar to FirestoreAdmin.CreateDatabase except instead of creating a new empty database, a new database is created with the database type, index configuration, and documents from an existing database. The long-running operation can be used to track the progress of the clone, with the Operation's metadata field type being the CloneDatabaseMetadata. The response type is the Database if the clone was successful. The new database is not readable or writeable until the LRO has completed.",
146+
"flatPath": "v1/projects/{projectsId}/databases:clone",
147+
"httpMethod": "POST",
148+
"id": "firestore.projects.databases.clone",
149+
"parameterOrder": [
150+
"parent"
151+
],
152+
"parameters": {
153+
"parent": {
154+
"description": "Required. The project to clone the database in. Format is `projects/{project_id}`.",
155+
"location": "path",
156+
"pattern": "^projects/[^/]+$",
157+
"required": true,
158+
"type": "string"
159+
}
160+
},
161+
"path": "v1/{+parent}/databases:clone",
162+
"request": {
163+
"$ref": "GoogleFirestoreAdminV1CloneDatabaseRequest"
164+
},
165+
"response": {
166+
"$ref": "GoogleLongrunningOperation"
167+
},
168+
"scopes": [
169+
"https://www.googleapis.com/auth/cloud-platform",
170+
"https://www.googleapis.com/auth/datastore"
171+
]
172+
},
144173
"create": {
145174
"description": "Create a database.",
146175
"flatPath": "v1/projects/{projectsId}/databases",
@@ -1920,7 +1949,7 @@
19201949
}
19211950
}
19221951
},
1923-
"revision": "20250414",
1952+
"revision": "20250618",
19241953
"rootUrl": "https://firestore.googleapis.com/",
19251954
"schemas": {
19261955
"Aggregation": {
@@ -2839,6 +2868,85 @@
28392868
},
28402869
"type": "object"
28412870
},
2871+
"GoogleFirestoreAdminV1CloneDatabaseMetadata": {
2872+
"description": "Metadata for the long-running operation from the CloneDatabase request.",
2873+
"id": "GoogleFirestoreAdminV1CloneDatabaseMetadata",
2874+
"properties": {
2875+
"database": {
2876+
"description": "The name of the database being cloned to.",
2877+
"type": "string"
2878+
},
2879+
"endTime": {
2880+
"description": "The time the clone finished, unset for ongoing clones.",
2881+
"format": "google-datetime",
2882+
"type": "string"
2883+
},
2884+
"operationState": {
2885+
"description": "The operation state of the clone.",
2886+
"enum": [
2887+
"OPERATION_STATE_UNSPECIFIED",
2888+
"INITIALIZING",
2889+
"PROCESSING",
2890+
"CANCELLING",
2891+
"FINALIZING",
2892+
"SUCCESSFUL",
2893+
"FAILED",
2894+
"CANCELLED"
2895+
],
2896+
"enumDescriptions": [
2897+
"Unspecified.",
2898+
"Request is being prepared for processing.",
2899+
"Request is actively being processed.",
2900+
"Request is in the process of being cancelled after user called google.longrunning.Operations.CancelOperation on the operation.",
2901+
"Request has been processed and is in its finalization stage.",
2902+
"Request has completed successfully.",
2903+
"Request has finished being processed, but encountered an error.",
2904+
"Request has finished being cancelled after user called google.longrunning.Operations.CancelOperation."
2905+
],
2906+
"type": "string"
2907+
},
2908+
"pitrSnapshot": {
2909+
"$ref": "GoogleFirestoreAdminV1PitrSnapshot",
2910+
"description": "The snapshot from which this database was cloned."
2911+
},
2912+
"progressPercentage": {
2913+
"$ref": "GoogleFirestoreAdminV1Progress",
2914+
"description": "How far along the clone is as an estimated percentage of remaining time."
2915+
},
2916+
"startTime": {
2917+
"description": "The time the clone was started.",
2918+
"format": "google-datetime",
2919+
"type": "string"
2920+
}
2921+
},
2922+
"type": "object"
2923+
},
2924+
"GoogleFirestoreAdminV1CloneDatabaseRequest": {
2925+
"description": "The request message for FirestoreAdmin.CloneDatabase.",
2926+
"id": "GoogleFirestoreAdminV1CloneDatabaseRequest",
2927+
"properties": {
2928+
"databaseId": {
2929+
"description": "Required. The ID to use for the database, which will become the final component of the database's resource name. This database ID must not be associated with an existing database. This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. \"(default)\" database ID is also valid.",
2930+
"type": "string"
2931+
},
2932+
"encryptionConfig": {
2933+
"$ref": "GoogleFirestoreAdminV1EncryptionConfig",
2934+
"description": "Optional. Encryption configuration for the cloned database. If this field is not specified, the cloned database will use the same encryption configuration as the source database, namely use_source_encryption."
2935+
},
2936+
"pitrSnapshot": {
2937+
"$ref": "GoogleFirestoreAdminV1PitrSnapshot",
2938+
"description": "Required. Specification of the PITR data to clone from. The source database must exist. The cloned database will be created in the same location as the source database."
2939+
},
2940+
"tags": {
2941+
"additionalProperties": {
2942+
"type": "string"
2943+
},
2944+
"description": "Optional. Immutable. Tags to be bound to the cloned database. The tags should be provided in the format of `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`.",
2945+
"type": "object"
2946+
}
2947+
},
2948+
"type": "object"
2949+
},
28422950
"GoogleFirestoreAdminV1CmekConfig": {
28432951
"description": "The CMEK (Customer Managed Encryption Key) configuration for a Firestore database. If not present, the database is secured by the default Google encryption key.",
28442952
"id": "GoogleFirestoreAdminV1CmekConfig",
@@ -3735,6 +3843,28 @@
37353843
"properties": {},
37363844
"type": "object"
37373845
},
3846+
"GoogleFirestoreAdminV1PitrSnapshot": {
3847+
"description": "A consistent snapshot of a database at a specific point in time. A PITR (Point-in-time recovery) snapshot with previous versions of a database's data is available for every minute up to the associated database's data retention period. If the PITR feature is enabled, the retention period is 7 days; otherwise, it is one hour.",
3848+
"id": "GoogleFirestoreAdminV1PitrSnapshot",
3849+
"properties": {
3850+
"database": {
3851+
"description": "Required. The name of the database that this was a snapshot of. Format: `projects/{project}/databases/{database}`.",
3852+
"type": "string"
3853+
},
3854+
"databaseUid": {
3855+
"description": "Output only. Public UUID of the database the snapshot was associated with.",
3856+
"format": "byte",
3857+
"readOnly": true,
3858+
"type": "string"
3859+
},
3860+
"snapshotTime": {
3861+
"description": "Required. Snapshot time of the database.",
3862+
"format": "google-datetime",
3863+
"type": "string"
3864+
}
3865+
},
3866+
"type": "object"
3867+
},
37383868
"GoogleFirestoreAdminV1Progress": {
37393869
"description": "Describes the progress of the operation. Unit of work is generic and must be interpreted based on where Progress is used.",
37403870
"id": "GoogleFirestoreAdminV1Progress",

googleapiclient/discovery_cache/documents/firestore.v1beta1.json

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@
950950
}
951951
}
952952
},
953-
"revision": "20250307",
953+
"revision": "20250618",
954954
"rootUrl": "https://firestore.googleapis.com/",
955955
"schemas": {
956956
"Aggregation": {
@@ -1744,6 +1744,59 @@
17441744
},
17451745
"type": "object"
17461746
},
1747+
"GoogleFirestoreAdminV1CloneDatabaseMetadata": {
1748+
"description": "Metadata for the long-running operation from the CloneDatabase request.",
1749+
"id": "GoogleFirestoreAdminV1CloneDatabaseMetadata",
1750+
"properties": {
1751+
"database": {
1752+
"description": "The name of the database being cloned to.",
1753+
"type": "string"
1754+
},
1755+
"endTime": {
1756+
"description": "The time the clone finished, unset for ongoing clones.",
1757+
"format": "google-datetime",
1758+
"type": "string"
1759+
},
1760+
"operationState": {
1761+
"description": "The operation state of the clone.",
1762+
"enum": [
1763+
"OPERATION_STATE_UNSPECIFIED",
1764+
"INITIALIZING",
1765+
"PROCESSING",
1766+
"CANCELLING",
1767+
"FINALIZING",
1768+
"SUCCESSFUL",
1769+
"FAILED",
1770+
"CANCELLED"
1771+
],
1772+
"enumDescriptions": [
1773+
"Unspecified.",
1774+
"Request is being prepared for processing.",
1775+
"Request is actively being processed.",
1776+
"Request is in the process of being cancelled after user called google.longrunning.Operations.CancelOperation on the operation.",
1777+
"Request has been processed and is in its finalization stage.",
1778+
"Request has completed successfully.",
1779+
"Request has finished being processed, but encountered an error.",
1780+
"Request has finished being cancelled after user called google.longrunning.Operations.CancelOperation."
1781+
],
1782+
"type": "string"
1783+
},
1784+
"pitrSnapshot": {
1785+
"$ref": "GoogleFirestoreAdminV1PitrSnapshot",
1786+
"description": "The snapshot from which this database was cloned."
1787+
},
1788+
"progressPercentage": {
1789+
"$ref": "GoogleFirestoreAdminV1Progress",
1790+
"description": "How far along the clone is as an estimated percentage of remaining time."
1791+
},
1792+
"startTime": {
1793+
"description": "The time the clone was started.",
1794+
"format": "google-datetime",
1795+
"type": "string"
1796+
}
1797+
},
1798+
"type": "object"
1799+
},
17471800
"GoogleFirestoreAdminV1CreateDatabaseMetadata": {
17481801
"description": "Metadata related to the create database operation.",
17491802
"id": "GoogleFirestoreAdminV1CreateDatabaseMetadata",
@@ -1756,6 +1809,28 @@
17561809
"properties": {},
17571810
"type": "object"
17581811
},
1812+
"GoogleFirestoreAdminV1PitrSnapshot": {
1813+
"description": "A consistent snapshot of a database at a specific point in time. A PITR (Point-in-time recovery) snapshot with previous versions of a database's data is available for every minute up to the associated database's data retention period. If the PITR feature is enabled, the retention period is 7 days; otherwise, it is one hour.",
1814+
"id": "GoogleFirestoreAdminV1PitrSnapshot",
1815+
"properties": {
1816+
"database": {
1817+
"description": "Required. The name of the database that this was a snapshot of. Format: `projects/{project}/databases/{database}`.",
1818+
"type": "string"
1819+
},
1820+
"databaseUid": {
1821+
"description": "Output only. Public UUID of the database the snapshot was associated with.",
1822+
"format": "byte",
1823+
"readOnly": true,
1824+
"type": "string"
1825+
},
1826+
"snapshotTime": {
1827+
"description": "Required. Snapshot time of the database.",
1828+
"format": "google-datetime",
1829+
"type": "string"
1830+
}
1831+
},
1832+
"type": "object"
1833+
},
17591834
"GoogleFirestoreAdminV1Progress": {
17601835
"description": "Describes the progress of the operation. Unit of work is generic and must be interpreted based on where Progress is used.",
17611836
"id": "GoogleFirestoreAdminV1Progress",

0 commit comments

Comments
 (0)