projects
Creates, updates, deletes, gets or lists a projects resource.
Overview
| Name | projects |
| Type | Resource |
| Id | google.datastore.projects |
Fields
The following fields are returned by SELECT queries:
SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
allocate_ids | exec | projectId | Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted. | |
begin_transaction | exec | projectId | Begins a new transaction. | |
commit | exec | projectId | Commits a transaction, optionally creating, deleting or modifying some entities. | |
export | exec | projectId | Exports a copy of all or a subset of entities from Google Cloud Datastore to another storage system, such as Google Cloud Storage. Recent updates to entities may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage. | |
import | exec | projectId | Imports entities into Google Cloud Datastore. Existing entities with the same key are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportEntities operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Datastore. | |
lookup | exec | projectId | Looks up entities by key. | |
reserve_ids | exec | projectId | Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore. | |
rollback | exec | projectId | Rolls back a transaction. | |
run_aggregation_query | exec | projectId | Runs an aggregation query. | |
run_query | exec | projectId | Queries for entities. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
projectId | string |
Lifecycle Methods
- allocate_ids
- begin_transaction
- commit
- export
- import
- lookup
- reserve_ids
- rollback
- run_aggregation_query
- run_query
Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted.
EXEC google.datastore.projects.allocate_ids
@projectId='{{ projectId }}' --required
@@json=
'{
"databaseId": "{{ databaseId }}",
"keys": "{{ keys }}",
"requestOptions": "{{ requestOptions }}"
}'
;
Begins a new transaction.
EXEC google.datastore.projects.begin_transaction
@projectId='{{ projectId }}' --required
@@json=
'{
"databaseId": "{{ databaseId }}",
"requestOptions": "{{ requestOptions }}",
"transactionOptions": "{{ transactionOptions }}"
}'
;
Commits a transaction, optionally creating, deleting or modifying some entities.
EXEC google.datastore.projects.commit
@projectId='{{ projectId }}' --required
@@json=
'{
"databaseId": "{{ databaseId }}",
"mode": "{{ mode }}",
"mutations": "{{ mutations }}",
"requestOptions": "{{ requestOptions }}",
"singleUseTransaction": "{{ singleUseTransaction }}",
"transaction": "{{ transaction }}"
}'
;
Exports a copy of all or a subset of entities from Google Cloud Datastore to another storage system, such as Google Cloud Storage. Recent updates to entities may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage.
EXEC google.datastore.projects.export
@projectId='{{ projectId }}' --required
@@json=
'{
"entityFilter": "{{ entityFilter }}",
"labels": "{{ labels }}",
"outputUrlPrefix": "{{ outputUrlPrefix }}"
}'
;
Imports entities into Google Cloud Datastore. Existing entities with the same key are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportEntities operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Datastore.
EXEC google.datastore.projects.import
@projectId='{{ projectId }}' --required
@@json=
'{
"entityFilter": "{{ entityFilter }}",
"inputUrl": "{{ inputUrl }}",
"labels": "{{ labels }}"
}'
;
Looks up entities by key.
EXEC google.datastore.projects.lookup
@projectId='{{ projectId }}' --required
@@json=
'{
"databaseId": "{{ databaseId }}",
"keys": "{{ keys }}",
"propertyMask": "{{ propertyMask }}",
"readOptions": "{{ readOptions }}",
"requestOptions": "{{ requestOptions }}"
}'
;
Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore.
EXEC google.datastore.projects.reserve_ids
@projectId='{{ projectId }}' --required
@@json=
'{
"databaseId": "{{ databaseId }}",
"keys": "{{ keys }}",
"requestOptions": "{{ requestOptions }}"
}'
;
Rolls back a transaction.
EXEC google.datastore.projects.rollback
@projectId='{{ projectId }}' --required
@@json=
'{
"databaseId": "{{ databaseId }}",
"requestOptions": "{{ requestOptions }}",
"transaction": "{{ transaction }}"
}'
;
Runs an aggregation query.
EXEC google.datastore.projects.run_aggregation_query
@projectId='{{ projectId }}' --required
@@json=
'{
"aggregationQuery": "{{ aggregationQuery }}",
"databaseId": "{{ databaseId }}",
"explainOptions": "{{ explainOptions }}",
"gqlQuery": "{{ gqlQuery }}",
"partitionId": "{{ partitionId }}",
"readOptions": "{{ readOptions }}",
"requestOptions": "{{ requestOptions }}"
}'
;
Queries for entities.
EXEC google.datastore.projects.run_query
@projectId='{{ projectId }}' --required
@@json=
'{
"databaseId": "{{ databaseId }}",
"explainOptions": "{{ explainOptions }}",
"gqlQuery": "{{ gqlQuery }}",
"partitionId": "{{ partitionId }}",
"propertyMask": "{{ propertyMask }}",
"query": "{{ query }}",
"readOptions": "{{ readOptions }}",
"requestOptions": "{{ requestOptions }}"
}'
;