class ProjectsIndexes extends Resource (View source)

The "indexes" collection of methods.

Typical usage is:

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

Methods

create(string $projectId, GoogleDatastoreAdminV1Index $postBody, array $optParams = [])

Creates the specified index. A newly created index's initial state is CREATING. On completion of the returned google.longrunning.Operation, the state will be READY. If the index already exists, the call will return an ALREADY_EXISTS status. During index creation, the process could result in an error, in which case the index will move to the ERROR state. The process can be recovered by fixing the data that caused the error, removing the index with delete, then re-creating the index with create. Indexes with a single property cannot be created. (indexes.create)

delete(string $projectId, string $indexId, array $optParams = [])

Deletes an existing index. An index can only be deleted if it is in a READY or ERROR state. On successful execution of the request, the index will be in a DELETING state. And on completion of the returned google.longrunning.Operation, the index will be removed. During index deletion, the process could result in an error, in which case the index will move to the ERROR state. The process can be recovered by fixing the data that caused the error, followed by calling delete again. (indexes.delete)

get(string $projectId, string $indexId, array $optParams = [])

Gets an index. (indexes.get)

listProjectsIndexes(string $projectId, array $optParams = [])

Lists the indexes that match the specified filters. Datastore uses an eventually consistent query to fetch the list of indexes and may occasionally return stale results. (indexes.listProjectsIndexes)

Details

GoogleLongrunningOperation create(string $projectId, GoogleDatastoreAdminV1Index $postBody, array $optParams = [])

Creates the specified index. A newly created index's initial state is CREATING. On completion of the returned google.longrunning.Operation, the state will be READY. If the index already exists, the call will return an ALREADY_EXISTS status. During index creation, the process could result in an error, in which case the index will move to the ERROR state. The process can be recovered by fixing the data that caused the error, removing the index with delete, then re-creating the index with create. Indexes with a single property cannot be created. (indexes.create)

Parameters

string $projectId

Project ID against which to make the request.

GoogleDatastoreAdminV1Index $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleLongrunningOperation delete(string $projectId, string $indexId, array $optParams = [])

Deletes an existing index. An index can only be deleted if it is in a READY or ERROR state. On successful execution of the request, the index will be in a DELETING state. And on completion of the returned google.longrunning.Operation, the index will be removed. During index deletion, the process could result in an error, in which case the index will move to the ERROR state. The process can be recovered by fixing the data that caused the error, followed by calling delete again. (indexes.delete)

Parameters

string $projectId

Project ID against which to make the request.

string $indexId

The resource ID of the index to delete.

array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleDatastoreAdminV1Index get(string $projectId, string $indexId, array $optParams = [])

Gets an index. (indexes.get)

Parameters

string $projectId

Project ID against which to make the request.

string $indexId

The resource ID of the index to get.

array $optParams

Optional parameters.

Return Value

GoogleDatastoreAdminV1Index

Exceptions

Exception

GoogleDatastoreAdminV1ListIndexesResponse listProjectsIndexes(string $projectId, array $optParams = [])

Lists the indexes that match the specified filters. Datastore uses an eventually consistent query to fetch the list of indexes and may occasionally return stale results. (indexes.listProjectsIndexes)

Parameters

string $projectId

Project ID against which to make the request.

array $optParams

Optional parameters.

Return Value

GoogleDatastoreAdminV1ListIndexesResponse

Exceptions

Exception