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.
statestringOutput only. State of the host group.
typestringRequired. Type of the host group.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, hostGroupsIdReturns details of the specified host group.
listselectprojectsId, locationsIdpageSize, orderBy, pageToken, filterReturns 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__hosts,
data__type,
data__osType,
data__name,
data__description,
data__labels,
projectsId,
locationsId,
hostGroupId
)
SELECT
'{{ hosts }}',
'{{ type }}',
'{{ osType }}',
'{{ name }}',
'{{ description }}',
'{{ labels }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ hostGroupId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates an existing host group.

UPDATE google.netapp.host_groups
SET
data__hosts = '{{ hosts }}',
data__type = '{{ type }}',
data__osType = '{{ osType }}',
data__name = '{{ name }}',
data__description = '{{ description }}',
data__labels = '{{ labels }}'
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
;