nfs_shares
Creates, updates, deletes, gets or lists a nfs_shares
resource.
Overview
Name | nfs_shares |
Type | Resource |
Id | google.baremetalsolution.nfs_shares |
Fields
Name | Datatype | Description |
---|---|---|
id | string | Output 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. |
name | string | Immutable. The name of the NFS share. |
allowedClients | array | List of allowed access points. |
labels | object | Labels as key value pairs. |
nfsShareId | string | Output only. An identifier for the NFS share, generated by the backend. This field will be deprecated in the future, use id instead. |
pod | string | Immutable. Pod name. Pod is an independent part of infrastructure. NFSShare can only be connected to the assets (networks, instances) allocated in the same pod. |
requestedSizeGib | string | The requested size, in GiB. |
state | string | Output only. The state of the NFS share. |
storageType | string | Immutable. The storage type of the underlying volume. |
volume | string | Output only. The underlying volume of the share. Created automatically during provisioning. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, nfsSharesId, projectsId | Get details of a single NFS share. |
list | SELECT | locationsId, projectsId | List NFS shares. |
create | INSERT | locationsId, projectsId | Create an NFS share. |
delete | DELETE | locationsId, nfsSharesId, projectsId | Delete an NFS share. The underlying volume is automatically deleted. |
patch | UPDATE | locationsId, nfsSharesId, projectsId | Update details of a single NFS share. |
rename | EXEC | locationsId, nfsSharesId, projectsId | RenameNfsShare 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.baremetalsolution.nfs_shares (
locationsId,
projectsId,
name,
allowedClients,
labels,
requestedSizeGib,
storageType,
pod
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ allowedClients }}',
'{{ labels }}',
'{{ requestedSizeGib }}',
'{{ storageType }}',
'{{ pod }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: nfsShareId
value: string
- name: id
value: string
- name: state
value: string
- name: volume
value: string
- name: allowedClients
value:
- - name: network
value: string
- name: shareIp
value: string
- name: allowedClientsCidr
value: string
- name: mountPermissions
value: string
- name: allowDev
value: boolean
- name: allowSuid
value: boolean
- name: noRootSquash
value: boolean
- name: nfsPath
value: string
- name: labels
value: object
- name: requestedSizeGib
value: string
- name: storageType
value: string
- name: pod
value: string
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 }}';