nfs_shares
Creates, updates, deletes, gets or lists a nfs_shares
resource.
Overview
Name | nfs_shares |
Type | Resource |
Id | google.baremetalsolution.nfs_shares |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
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 (int64) | 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. |
Successful response
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 (int64) | 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
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , nfsSharesId | Get details of a single NFS share. | |
list | select | projectsId , locationsId | pageSize , pageToken , filter | List NFS shares. |
create | insert | projectsId , locationsId | Create an NFS share. | |
patch | update | projectsId , locationsId , nfsSharesId | updateMask | Update details of a single NFS share. |
delete | delete | projectsId , locationsId , nfsSharesId | Delete an NFS share. The underlying volume is automatically deleted. | |
rename | exec | projectsId , locationsId , nfsSharesId | RenameNfsShare sets a new name for an nfsshare. Use with caution, previous names become immediately invalidated. |
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.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
nfsSharesId | string | |
projectsId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Get details of a single NFS share.
SELECT
id,
name,
allowedClients,
labels,
nfsShareId,
pod,
requestedSizeGib,
state,
storageType,
volume
FROM google.baremetalsolution.nfs_shares
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND nfsSharesId = '{{ nfsSharesId }}' -- required;
List NFS shares.
SELECT
id,
name,
allowedClients,
labels,
nfsShareId,
pod,
requestedSizeGib,
state,
storageType,
volume
FROM google.baremetalsolution.nfs_shares
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}';
INSERT
examples
- create
- Manifest
Create an NFS share.
INSERT INTO google.baremetalsolution.nfs_shares (
data__name,
data__allowedClients,
data__labels,
data__requestedSizeGib,
data__storageType,
data__pod,
projectsId,
locationsId
)
SELECT
'{{ name }}',
'{{ allowedClients }}',
'{{ labels }}',
'{{ requestedSizeGib }}',
'{{ storageType }}',
'{{ pod }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: nfs_shares
props:
- name: projectsId
value: string
description: Required parameter for the nfs_shares resource.
- name: locationsId
value: string
description: Required parameter for the nfs_shares resource.
- name: name
value: string
description: >
Immutable. The name of the NFS share.
- name: allowedClients
value: array
description: >
List of allowed access points.
- name: labels
value: object
description: >
Labels as key value pairs.
- name: requestedSizeGib
value: string
description: >
The requested size, in GiB.
- name: storageType
value: string
description: >
Immutable. The storage type of the underlying volume.
valid_values: ['STORAGE_TYPE_UNSPECIFIED', 'SSD', 'HDD']
- name: pod
value: string
description: >
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.
UPDATE
examples
- patch
Update details of a single NFS share.
UPDATE google.baremetalsolution.nfs_shares
SET
data__name = '{{ name }}',
data__allowedClients = '{{ allowedClients }}',
data__labels = '{{ labels }}',
data__requestedSizeGib = '{{ requestedSizeGib }}',
data__storageType = '{{ storageType }}',
data__pod = '{{ pod }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND nfsSharesId = '{{ nfsSharesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- delete
Delete an NFS share. The underlying volume is automatically deleted.
DELETE FROM google.baremetalsolution.nfs_shares
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND nfsSharesId = '{{ nfsSharesId }}' --required;
Lifecycle Methods
- rename
RenameNfsShare sets a new name for an nfsshare. Use with caution, previous names become immediately invalidated.
EXEC google.baremetalsolution.nfs_shares.rename
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@nfsSharesId='{{ nfsSharesId }}' --required
@@json=
'{
"newNfsshareId": "{{ newNfsshareId }}"
}';