Skip to main content

instance_groups_instances

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

Overview

Nameinstance_groups_instances
TypeResource
Idgoogle.compute.instance_groups_instances

Fields

NameDatatypeDescription
instancestring[Output Only] The URL of the instance.
namedPortsarray[Output Only] The named ports that belong to this instance group.
statusstring[Output Only] The status of the instance.

Methods

NameAccessible byRequired ParamsDescription
list_instancesSELECTinstanceGroup, project, zoneLists the instances in the specified instance group. The orderBy query parameter is not supported. The filter query parameter is supported, but only for expressions that use eq (equal) or ne (not equal) operators.
add_instancesINSERTinstanceGroup, project, zoneAdds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.
remove_instancesDELETEinstanceGroup, project, zoneRemoves one or more instances from the specified instance group, but does not delete those instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.

SELECT examples

Lists the instances in the specified instance group. The orderBy query parameter is not supported. The filter query parameter is supported, but only for expressions that use eq (equal) or ne (not equal) operators.

SELECT
instance,
namedPorts,
status
FROM google.compute.instance_groups_instances
WHERE instanceGroup = '{{ instanceGroup }}'
AND project = '{{ project }}'
AND zone = '{{ zone }}';

INSERT example

Use the following StackQL query and manifest file to create a new instance_groups_instances resource.

/*+ create */
INSERT INTO google.compute.instance_groups_instances (
instanceGroup,
project,
zone,
instances
)
SELECT
'{{ instanceGroup }}',
'{{ project }}',
'{{ zone }}',
'{{ instances }}'
;

DELETE example

Deletes the specified instance_groups_instances resource.

/*+ delete */
DELETE FROM google.compute.instance_groups_instances
WHERE instanceGroup = '{{ instanceGroup }}'
AND project = '{{ project }}'
AND zone = '{{ zone }}';