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 |
|---|---|---|---|---|
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. | |
run_aggregation_query | exec | projectId | Runs an aggregation query. | |
begin_transaction | exec | projectId | Begins a new transaction. | |
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. | |
allocate_ids | exec | projectId | Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted. | |
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_query | exec | projectId | Queries for entities. | |
commit | exec | projectId | Commits a transaction, optionally creating, deleting or modifying some 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
- export
- run_aggregation_query
- begin_transaction
- import
- allocate_ids
- lookup
- reserve_ids
- rollback
- run_query
- commit
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=
'{
"labels": "{{ labels }}",
"outputUrlPrefix": "{{ outputUrlPrefix }}",
"entityFilter": "{{ entityFilter }}"
}'
;
Runs an aggregation query.
EXEC google.datastore.projects.run_aggregation_query
@projectId='{{ projectId }}' --required
@@json=
'{
"databaseId": "{{ databaseId }}",
"aggregationQuery": "{{ aggregationQuery }}",
"readOptions": "{{ readOptions }}",
"explainOptions": "{{ explainOptions }}",
"gqlQuery": "{{ gqlQuery }}",
"partitionId": "{{ partitionId }}"
}'
;
Begins a new transaction.
EXEC google.datastore.projects.begin_transaction
@projectId='{{ projectId }}' --required
@@json=
'{
"databaseId": "{{ databaseId }}",
"transactionOptions": "{{ transactionOptions }}"
}'
;
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=
'{
"labels": "{{ labels }}",
"inputUrl": "{{ inputUrl }}",
"entityFilter": "{{ entityFilter }}"
}'
;
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=
'{
"keys": "{{ keys }}",
"databaseId": "{{ databaseId }}"
}'
;
Looks up entities by key.
EXEC google.datastore.projects.lookup
@projectId='{{ projectId }}' --required
@@json=
'{
"databaseId": "{{ databaseId }}",
"readOptions": "{{ readOptions }}",
"keys": "{{ keys }}",
"propertyMask": "{{ propertyMask }}"
}'
;
Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore.
EXEC google.datastore.projects.reserve_ids
@projectId='{{ projectId }}' --required
@@json=
'{
"keys": "{{ keys }}",
"databaseId": "{{ databaseId }}"
}'
;
Rolls back a transaction.
EXEC google.datastore.projects.rollback
@projectId='{{ projectId }}' --required
@@json=
'{
"databaseId": "{{ databaseId }}",
"transaction": "{{ transaction }}"
}'
;
Queries for entities.
EXEC google.datastore.projects.run_query
@projectId='{{ projectId }}' --required
@@json=
'{
"readOptions": "{{ readOptions }}",
"propertyMask": "{{ propertyMask }}",
"databaseId": "{{ databaseId }}",
"partitionId": "{{ partitionId }}",
"query": "{{ query }}",
"explainOptions": "{{ explainOptions }}",
"gqlQuery": "{{ gqlQuery }}"
}'
;
Commits a transaction, optionally creating, deleting or modifying some entities.
EXEC google.datastore.projects.commit
@projectId='{{ projectId }}' --required
@@json=
'{
"mode": "{{ mode }}",
"singleUseTransaction": "{{ singleUseTransaction }}",
"databaseId": "{{ databaseId }}",
"transaction": "{{ transaction }}",
"mutations": "{{ mutations }}"
}'
;