Skip to main content

datastores

Creates, updates, deletes, gets or lists a datastores resource.

Overview

Namedatastores
TypeResource
Idgoogle.vmwareengine.datastores

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringOutput only. Identifier. The resource name of this datastore. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: projects/my-project/locations/us-central1/datastores/datastore
clustersarrayOutput only. Clusters to which the datastore is attached.
createTimestring (google-datetime)Output only. Creation time of this resource.
descriptionstringOptional. User-provided description for this datastore
etagstringOptional. Checksum that may be sent on update and delete requests to ensure that the user-provided value is up to date before the server processes a request. The server computes checksums based on the value of other fields in the request.
nfsDatastoreobjectRequired. Settings for the NFS datastore. (id: NfsDatastore)
statestringOutput only. The state of the Datastore. (STATE_UNSPECIFIED, CREATING, ACTIVE, UPDATING, DELETING)
uidstringOutput only. System-generated unique identifier for the resource.
updateTimestring (google-datetime)Output only. Last update time of this resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, datastoresIdRetrieves a Datastore resource by its resource name. The resource contains details of the Datastore, such as its description, subnets, type, and more.
listselectprojectsId, locationsIdrequestId, filter, orderBy, pageToken, pageSizeLists Datastore resources in a given project and location.
createinsertprojectsId, locationsIdrequestId, datastoreIdCreates a new Datastore resource in a given project and location.
patchupdateprojectsId, locationsId, datastoresIdupdateMask, requestIdModifies a Datastore resource. Only fields specified in updateMask are applied.
deletedeleteprojectsId, locationsId, datastoresIdetag, requestIdDeletes a Datastore resource. You can only delete a Datastore after all resources that refer to it are deleted. For example, multiple clusters of the same private cloud or different private clouds can refer to the same 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.

NameDatatypeDescription
datastoresIdstring
locationsIdstring
projectsIdstring
datastoreIdstring
etagstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
updateMaskstring (google-fieldmask)

SELECT examples

Retrieves a Datastore resource by its resource name. The resource contains details of the Datastore, such as its description, subnets, type, and more.

SELECT
name,
clusters,
createTime,
description,
etag,
nfsDatastore,
state,
uid,
updateTime
FROM google.vmwareengine.datastores
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND datastoresId = '{{ datastoresId }}' -- required
;

INSERT examples

Creates a new Datastore resource in a given project and location.

INSERT INTO google.vmwareengine.datastores (
data__description,
data__etag,
data__nfsDatastore,
projectsId,
locationsId,
requestId,
datastoreId
)
SELECT
'{{ description }}',
'{{ etag }}',
'{{ nfsDatastore }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ requestId }}',
'{{ datastoreId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Modifies a Datastore resource. Only fields specified in updateMask are applied.

UPDATE google.vmwareengine.datastores
SET
data__description = '{{ description }}',
data__etag = '{{ etag }}',
data__nfsDatastore = '{{ nfsDatastore }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND datastoresId = '{{ datastoresId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a Datastore resource. You can only delete a Datastore after all resources that refer to it are deleted. For example, multiple clusters of the same private cloud or different private clouds can refer to the same datastore.

DELETE FROM google.vmwareengine.datastores
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND datastoresId = '{{ datastoresId }}' --required
AND etag = '{{ etag }}'
AND requestId = '{{ requestId }}'
;