|
1830 | 1830 | "https://www.googleapis.com/auth/spanner.data" |
1831 | 1831 | ] |
1832 | 1832 | }, |
| 1833 | + "batchWrite": { |
| 1834 | + "description": "Batches the supplied mutation groups in a collection of efficient transactions. All mutations in a group are committed atomically. However, mutations across groups can be committed non-atomically in an unspecified order and thus, they must be independent of each other. Partial failure is possible, i.e., some groups may have been committed successfully, while some may have failed. The results of individual batches are streamed into the response as the batches are applied. BatchWrite requests are not replay protected, meaning that each mutation group may be applied more than once. Replays of non-idempotent mutations may have undesirable effects. For example, replays of an insert mutation may produce an already exists error or result in additional rows if using generated or commit timestamp-based keys. We recommend structuring your mutation groups to be idempotent to avoid this issue.", |
| 1835 | + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:batchWrite", |
| 1836 | + "httpMethod": "POST", |
| 1837 | + "id": "spanner.projects.instances.databases.sessions.batchWrite", |
| 1838 | + "parameterOrder": [ |
| 1839 | + "session" |
| 1840 | + ], |
| 1841 | + "parameters": { |
| 1842 | + "session": { |
| 1843 | + "description": "Required. The session in which the batch request is to be run.", |
| 1844 | + "location": "path", |
| 1845 | + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", |
| 1846 | + "required": true, |
| 1847 | + "type": "string" |
| 1848 | + } |
| 1849 | + }, |
| 1850 | + "path": "v1/{+session}:batchWrite", |
| 1851 | + "request": { |
| 1852 | + "$ref": "BatchWriteRequest" |
| 1853 | + }, |
| 1854 | + "response": { |
| 1855 | + "$ref": "BatchWriteResponse" |
| 1856 | + }, |
| 1857 | + "scopes": [ |
| 1858 | + "https://www.googleapis.com/auth/cloud-platform", |
| 1859 | + "https://www.googleapis.com/auth/spanner.data" |
| 1860 | + ] |
| 1861 | + }, |
1833 | 1862 | "beginTransaction": { |
1834 | 1863 | "description": "Begins a new transaction. This step can often be skipped: Read, ExecuteSql and Commit can begin a new transaction as a side-effect.", |
1835 | 1864 | "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:beginTransaction", |
|
2565 | 2594 | } |
2566 | 2595 | } |
2567 | 2596 | }, |
2568 | | - "revision": "20230823", |
| 2597 | + "revision": "20230909", |
2569 | 2598 | "rootUrl": "https://spanner.googleapis.com/", |
2570 | 2599 | "schemas": { |
2571 | 2600 | "Backup": { |
|
2717 | 2746 | }, |
2718 | 2747 | "type": "object" |
2719 | 2748 | }, |
| 2749 | + "BatchWriteRequest": { |
| 2750 | + "description": "The request for BatchWrite.", |
| 2751 | + "id": "BatchWriteRequest", |
| 2752 | + "properties": { |
| 2753 | + "mutationGroups": { |
| 2754 | + "description": "Required. The groups of mutations to be applied.", |
| 2755 | + "items": { |
| 2756 | + "$ref": "MutationGroup" |
| 2757 | + }, |
| 2758 | + "type": "array" |
| 2759 | + }, |
| 2760 | + "requestOptions": { |
| 2761 | + "$ref": "RequestOptions", |
| 2762 | + "description": "Common options for this request." |
| 2763 | + } |
| 2764 | + }, |
| 2765 | + "type": "object" |
| 2766 | + }, |
| 2767 | + "BatchWriteResponse": { |
| 2768 | + "description": "The result of applying a batch of mutations.", |
| 2769 | + "id": "BatchWriteResponse", |
| 2770 | + "properties": { |
| 2771 | + "commitTimestamp": { |
| 2772 | + "description": "The commit timestamp of the transaction that applied this batch. Present if `status` is `OK`, absent otherwise.", |
| 2773 | + "format": "google-datetime", |
| 2774 | + "type": "string" |
| 2775 | + }, |
| 2776 | + "indexes": { |
| 2777 | + "description": "The mutation groups applied in this batch. The values index into the `mutation_groups` field in the corresponding `BatchWriteRequest`.", |
| 2778 | + "items": { |
| 2779 | + "format": "int32", |
| 2780 | + "type": "integer" |
| 2781 | + }, |
| 2782 | + "type": "array" |
| 2783 | + }, |
| 2784 | + "status": { |
| 2785 | + "$ref": "Status", |
| 2786 | + "description": "An `OK` status indicates success. Any other status indicates a failure." |
| 2787 | + } |
| 2788 | + }, |
| 2789 | + "type": "object" |
| 2790 | + }, |
2720 | 2791 | "BeginTransactionRequest": { |
2721 | 2792 | "description": "The request for BeginTransaction.", |
2722 | 2793 | "id": "BeginTransactionRequest", |
|
4320 | 4391 | }, |
4321 | 4392 | "type": "object" |
4322 | 4393 | }, |
| 4394 | + "MutationGroup": { |
| 4395 | + "description": "A group of mutations to be committed together. Related mutations should be placed in a group. For example, two mutations inserting rows with the same primary key prefix in both parent and child tables are related.", |
| 4396 | + "id": "MutationGroup", |
| 4397 | + "properties": { |
| 4398 | + "mutations": { |
| 4399 | + "description": "Required. The mutations in this group.", |
| 4400 | + "items": { |
| 4401 | + "$ref": "Mutation" |
| 4402 | + }, |
| 4403 | + "type": "array" |
| 4404 | + } |
| 4405 | + }, |
| 4406 | + "type": "object" |
| 4407 | + }, |
4323 | 4408 | "Operation": { |
4324 | 4409 | "description": "This resource represents a long-running operation that is the result of a network API call.", |
4325 | 4410 | "id": "Operation", |
|
0 commit comments