Skip to main content

nfs_shares

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

Overview

Namenfs_shares
TypeResource
Idgoogle.baremetalsolution.nfs_shares

Fields

NameDatatypeDescription
idstringOutput only. An identifier for the NFS share, generated by the backend. This is the same value as nfs_share_id and will replace it in the future.
namestringImmutable. The name of the NFS share.
allowedClientsarrayList of allowed access points.
labelsobjectLabels as key value pairs.
nfsShareIdstringOutput only. An identifier for the NFS share, generated by the backend. This field will be deprecated in the future, use id instead.
podstringImmutable. Pod name. Pod is an independent part of infrastructure. NFSShare can only be connected to the assets (networks, instances) allocated in the same pod.
requestedSizeGibstringThe requested size, in GiB.
statestringOutput only. The state of the NFS share.
storageTypestringImmutable. The storage type of the underlying volume.
volumestringOutput only. The underlying volume of the share. Created automatically during provisioning.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, nfsSharesId, projectsIdGet details of a single NFS share.
listSELECTlocationsId, projectsIdList NFS shares.
createINSERTlocationsId, projectsIdCreate an NFS share.
deleteDELETElocationsId, nfsSharesId, projectsIdDelete an NFS share. The underlying volume is automatically deleted.
patchUPDATElocationsId, nfsSharesId, projectsIdUpdate details of a single NFS share.
renameEXEClocationsId, nfsSharesId, projectsIdRenameNfsShare sets a new name for an nfsshare. Use with caution, previous names become immediately invalidated.

SELECT examples

List NFS shares.

SELECT
id,
name,
allowedClients,
labels,
nfsShareId,
pod,
requestedSizeGib,
state,
storageType,
volume
FROM google.baremetalsolution.nfs_shares
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new nfs_shares resource.

/*+ create */
INSERT INTO google.baremetalsolution.nfs_shares (
locationsId,
projectsId,
name,
allowedClients,
labels,
requestedSizeGib,
storageType,
pod
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ allowedClients }}',
'{{ labels }}',
'{{ requestedSizeGib }}',
'{{ storageType }}',
'{{ pod }}'
;

UPDATE example

Updates a nfs_shares resource.

/*+ update */
UPDATE google.baremetalsolution.nfs_shares
SET
name = '{{ name }}',
allowedClients = '{{ allowedClients }}',
labels = '{{ labels }}',
requestedSizeGib = '{{ requestedSizeGib }}',
storageType = '{{ storageType }}',
pod = '{{ pod }}'
WHERE
locationsId = '{{ locationsId }}'
AND nfsSharesId = '{{ nfsSharesId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified nfs_shares resource.

/*+ delete */
DELETE FROM google.baremetalsolution.nfs_shares
WHERE locationsId = '{{ locationsId }}'
AND nfsSharesId = '{{ nfsSharesId }}'
AND projectsId = '{{ projectsId }}';