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