instance_groups_instances
Creates, updates, deletes, gets or lists a instance_groups_instances
resource.
Overview
Name | instance_groups_instances |
Type | Resource |
Id | google.compute.instance_groups_instances |
Fields
Name | Datatype | Description |
---|---|---|
instance | string | [Output Only] The URL of the instance. |
namedPorts | array | [Output Only] The named ports that belong to this instance group. |
status | string | [Output Only] The status of the instance. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
list_instances | SELECT | instanceGroup, project, zone | 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. |
add_instances | INSERT | instanceGroup, project, zone | Adds 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_instances | DELETE | instanceGroup, project, zone | Removes 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.compute.instance_groups_instances (
instanceGroup,
project,
zone,
instances
)
SELECT
'{{ instanceGroup }}',
'{{ project }}',
'{{ zone }}',
'{{ instances }}'
;
- name: your_resource_model_name
props:
- name: instances
value:
- - name: instance
value: string
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 }}';