class Projects extends Resource (View source)

The "projects" collection of methods.

Typical usage is:

 $datastoreService = new Google\Service\Datastore(...);
 $projects = $datastoreService->projects;

Methods

allocateIds(string $projectId, AllocateIdsRequest $postBody, array $optParams = [])

Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted. (projects.allocateIds)

beginTransaction(string $projectId, BeginTransactionRequest $postBody, array $optParams = [])

Begins a new transaction. (projects.beginTransaction)

commit(string $projectId, CommitRequest $postBody, array $optParams = [])

Commits a transaction, optionally creating, deleting or modifying some entities. (projects.commit)

export(string $projectId, GoogleDatastoreAdminV1ExportEntitiesRequest $postBody, array $optParams = [])

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(string $projectId, GoogleDatastoreAdminV1ImportEntitiesRequest $postBody, array $optParams = [])

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. (projects.import)

lookup(string $projectId, LookupRequest $postBody, array $optParams = [])

Looks up entities by key. (projects.lookup)

reserveIds(string $projectId, ReserveIdsRequest $postBody, array $optParams = [])

Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore.

rollback(string $projectId, RollbackRequest $postBody, array $optParams = [])

Rolls back a transaction. (projects.rollback)

runAggregationQuery(string $projectId, RunAggregationQueryRequest $postBody, array $optParams = [])

Runs an aggregation query. (projects.runAggregationQuery)

runQuery(string $projectId, RunQueryRequest $postBody, array $optParams = [])

Queries for entities. (projects.runQuery)

Details

AllocateIdsResponse allocateIds(string $projectId, AllocateIdsRequest $postBody, array $optParams = [])

Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted. (projects.allocateIds)

Parameters

string $projectId

Required. The ID of the project against which to make the request.

AllocateIdsRequest $postBody
array $optParams

Optional parameters.

Return Value

AllocateIdsResponse

Exceptions

Exception

BeginTransactionResponse beginTransaction(string $projectId, BeginTransactionRequest $postBody, array $optParams = [])

Begins a new transaction. (projects.beginTransaction)

Parameters

string $projectId

Required. The ID of the project against which to make the request.

BeginTransactionRequest $postBody
array $optParams

Optional parameters.

Return Value

BeginTransactionResponse

Exceptions

Exception

CommitResponse commit(string $projectId, CommitRequest $postBody, array $optParams = [])

Commits a transaction, optionally creating, deleting or modifying some entities. (projects.commit)

Parameters

string $projectId

Required. The ID of the project against which to make the request.

CommitRequest $postBody
array $optParams

Optional parameters.

Return Value

CommitResponse

Exceptions

Exception

GoogleLongrunningOperation export(string $projectId, GoogleDatastoreAdminV1ExportEntitiesRequest $postBody, array $optParams = [])

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.

(projects.export)

Parameters

string $projectId

Required. Project ID against which to make the request.

GoogleDatastoreAdminV1ExportEntitiesRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleLongrunningOperation import(string $projectId, GoogleDatastoreAdminV1ImportEntitiesRequest $postBody, array $optParams = [])

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. (projects.import)

Parameters

string $projectId

Required. Project ID against which to make the request.

GoogleDatastoreAdminV1ImportEntitiesRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

LookupResponse lookup(string $projectId, LookupRequest $postBody, array $optParams = [])

Looks up entities by key. (projects.lookup)

Parameters

string $projectId

Required. The ID of the project against which to make the request.

LookupRequest $postBody
array $optParams

Optional parameters.

Return Value

LookupResponse

Exceptions

Exception

ReserveIdsResponse reserveIds(string $projectId, ReserveIdsRequest $postBody, array $optParams = [])

Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore.

(projects.reserveIds)

Parameters

string $projectId

Required. The ID of the project against which to make the request.

ReserveIdsRequest $postBody
array $optParams

Optional parameters.

Return Value

ReserveIdsResponse

Exceptions

Exception

RollbackResponse rollback(string $projectId, RollbackRequest $postBody, array $optParams = [])

Rolls back a transaction. (projects.rollback)

Parameters

string $projectId

Required. The ID of the project against which to make the request.

RollbackRequest $postBody
array $optParams

Optional parameters.

Return Value

RollbackResponse

Exceptions

Exception

RunAggregationQueryResponse runAggregationQuery(string $projectId, RunAggregationQueryRequest $postBody, array $optParams = [])

Runs an aggregation query. (projects.runAggregationQuery)

Parameters

string $projectId

Required. The ID of the project against which to make the request.

RunAggregationQueryRequest $postBody
array $optParams

Optional parameters.

Return Value

RunAggregationQueryResponse

Exceptions

Exception

RunQueryResponse runQuery(string $projectId, RunQueryRequest $postBody, array $optParams = [])

Queries for entities. (projects.runQuery)

Parameters

string $projectId

Required. The ID of the project against which to make the request.

RunQueryRequest $postBody
array $optParams

Optional parameters.

Return Value

RunQueryResponse

Exceptions

Exception