host_groups
Creates, updates, deletes, gets or lists a host_groups resource.
Overview
| Name | host_groups |
| Type | Resource |
| Id | google.netapp.host_groups |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. The resource name of the host group. Format: projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}. |
createTime | string (google-datetime) | Output only. Create time of the host group. |
description | string | Optional. Description of the host group. |
hosts | array | Required. The list of hosts associated with the host group. |
labels | object | Optional. Labels of the host group. |
osType | string | Required. 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. |
state | string | Output only. State of the host group. |
type | string | Required. Type of the host group. |
| Name | Datatype | Description |
|---|
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, hostGroupsId | Returns details of the specified host group. | |
list | select | projectsId, locationsId | pageSize, orderBy, pageToken, filter | Returns a list of host groups in a location. Use '-' as location to list host groups across all locations. |
create | insert | projectsId, locationsId | hostGroupId | Creates a new host group. |
patch | update | projectsId, locationsId, hostGroupsId | updateMask | Updates an existing host group. |
delete | delete | projectsId, locationsId, hostGroupsId | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
hostGroupsId | string | |
locationsId | string | |
projectsId | string | |
filter | string | |
hostGroupId | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
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
;
Returns a list of host groups in a location. Use '-' as location to list host groups across all locations.
SELECT
*
FROM google.netapp.host_groups
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: host_groups
props:
- name: projectsId
value: string
description: Required parameter for the host_groups resource.
- name: locationsId
value: string
description: Required parameter for the host_groups resource.
- name: hosts
value: array
description: >
Required. The list of hosts associated with the host group.
- name: type
value: string
description: >
Required. Type of the host group.
valid_values: ['TYPE_UNSPECIFIED', 'ISCSI_INITIATOR']
- name: osType
value: string
description: >
Required. 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.
valid_values: ['OS_TYPE_UNSPECIFIED', 'LINUX', 'WINDOWS', 'ESXI']
- name: name
value: string
description: >
Identifier. The resource name of the host group. Format: `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`.
- name: description
value: string
description: >
Optional. Description of the host group.
- name: labels
value: object
description: >
Optional. Labels of the host group.
- name: hostGroupId
value: string
UPDATE examples
- patch
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
- delete
Deletes a host group.
DELETE FROM google.netapp.host_groups
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND hostGroupsId = '{{ hostGroupsId }}' --required
;