Skip to main content

host_groups

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

Overview​

Namehost_groups
TypeResource
Idgoogle.netapp.host_groups

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringIdentifier. The resource name of the host group. Format: projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}.
createTimestring (google-datetime)Output only. Create time of the host group.
descriptionstringOptional. Description of the host group.
hostsarrayRequired. The list of hosts associated with the host group.
labelsobjectOptional. Labels of the host group.
osTypestringRequired. The OS type of the host group. It indicates the type of operating system used by all of the hosts in the HostGroup. All hosts in a HostGroup must be of the same OS type. This can be set only when creating a HostGroup. (OS_TYPE_UNSPECIFIED, LINUX, WINDOWS, ESXI)
statestringOutput only. State of the host group. (STATE_UNSPECIFIED, CREATING, READY, UPDATING, DELETING, DISABLED)
typestringRequired. Type of the host group. (TYPE_UNSPECIFIED, ISCSI_INITIATOR)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, hostGroupsIdReturns details of the specified host group.
listselectprojectsId, locationsIdfilter, orderBy, pageSize, pageTokenReturns a list of host groups in a location. Use - as location to list host groups across all locations.
createinsertprojectsId, locationsIdhostGroupIdCreates a new host group.
patchupdateprojectsId, locationsId, hostGroupsIdupdateMaskUpdates an existing host group.
deletedeleteprojectsId, locationsId, hostGroupsIdDeletes a host group.

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
hostGroupsIdstring
locationsIdstring
projectsIdstring
filterstring
hostGroupIdstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples​

Returns details of the specified host group.

SELECT
name,
createTime,
description,
hosts,
labels,
osType,
state,
type
FROM google.netapp.host_groups
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND hostGroupsId = '{{ hostGroupsId }}' -- required
;

INSERT examples​

Creates a new host group.

INSERT INTO google.netapp.host_groups (
data__description,
data__hosts,
data__labels,
data__name,
data__osType,
data__type,
projectsId,
locationsId,
hostGroupId
)
SELECT
'{{ description }}',
'{{ hosts }}',
'{{ labels }}',
'{{ name }}',
'{{ osType }}',
'{{ type }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ hostGroupId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples​

Updates an existing host group.

UPDATE google.netapp.host_groups
SET
data__description = '{{ description }}',
data__hosts = '{{ hosts }}',
data__labels = '{{ labels }}',
data__name = '{{ name }}',
data__osType = '{{ osType }}',
data__type = '{{ type }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND hostGroupsId = '{{ hostGroupsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples​

Deletes a host group.

DELETE FROM google.netapp.host_groups
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND hostGroupsId = '{{ hostGroupsId }}' --required
;