// AddInstancesToInstanceGroup adds the given instances to the given instance group.
168670
func (gce *Cloud) AddInstancesToInstanceGroup(name string, zone string, instanceNames []string) error {
	if len(instanceNames) == 0 {
		return nil
	}
	// Adding the same instance twice will result in a 4xx error
	instances := []*compute.InstanceReference{}
	for _, ins := range instanceNames {
		instances = append(instances, &compute.InstanceReference{Instance: makeHostURL(gce.projectID, zone, ins)})
	}
	op, err := gce.service.InstanceGroups.AddInstances(
		gce.projectID, zone, name,
		&compute.InstanceGroupsAddInstancesRequest{
			Instances: instances,
		}).Do()

	if err != nil {
		return err
	}
	return gce.waitForZoneOp(op, zone)
}
1107175
func (s *UpdateFleetInput) SetInstanceType(v string) *UpdateFleetInput {
	s.InstanceType = &v
	return s
}
1374594
func (gce *Cloud) RemoveInstancesFromInstanceGroup(name string, zone string, instanceNames []string) error {
	if len(instanceNames) == 0 {
		return nil
	}
	instances := []*compute.InstanceReference{}
	for _, ins := range instanceNames {
		instanceLink := makeHostURL(gce.projectID, zone, ins)
		instances = append(instances, &compute.InstanceReference{Instance: instanceLink})
	}
	op, err := gce.service.InstanceGroups.RemoveInstances(
		gce.projectID, zone, name,
		&compute.InstanceGroupsRemoveInstancesRequest{
			Instances: instances,
		}).Do()

	if err != nil {
		if isHTTPErrorCode(err, http.StatusNotFound) {
			return nil
		}
		return err
	}
	return gce.waitForZoneOp(op, zone)
}
981941
func (s *RemoveAutoScalingPolicyInput) SetInstanceGroupId(v string) *RemoveAutoScalingPolicyInput {
	s.InstanceGroupId = &v
	return s
}
941789
func (gce *Cloud) DeleteInstanceGroup(name string, zone string) error {
	op, err := gce.service.InstanceGroups.Delete(
		gce.projectID, zone, name).Do()
	if err != nil {
		return err
	}
	return gce.waitForZoneOp(op, zone)
}
464282
func (g *Cloud) CreateInstanceGroup(ig *compute.InstanceGroup, zone string) error {
	ctx, cancel := cloud.ContextWithCallTimeout()
	defer cancel()

	mc := newInstanceGroupMetricContext("create", zone)
	return mc.Observe(g.c.InstanceGroups().Insert(ctx, meta.ZonalKey(ig.Name, zone), ig))
}
1144959
func makeInstanceGroupName(clusterID string) string {
	prefix := "k8s-ig"
	// clusterID might be empty for legacy clusters
	if clusterID == "" {
		return prefix
	}
	return fmt.Sprintf("%s--%s", prefix, clusterID)
}
550533
func (s *LaunchConfiguration) SetInstanceType(v string) *LaunchConfiguration {
	s.InstanceType = &v
	return s
}
854544
func matchInstanceGroup(mig *compute.InstanceGroupManager, c *kops.Cluster, instancegroups []*kops.InstanceGroup) (*kops.InstanceGroup, error) {
	migName := LastComponent(mig.Name)
	var matches []*kops.InstanceGroup
	for _, ig := range instancegroups {
		name := NameForInstanceGroupManager(c, ig, LastComponent(mig.Zone))
		if name == migName {
			matches = append(matches, ig)
		}
	}

	if len(matches) == 0 {
		return nil, nil
	}
	if len(matches) != 1 {
		return nil, fmt.Errorf("found multiple instance groups matching MIG %q", mig.Name)
	}
	return matches[0], nil
}
1292622
func (s *FleetAttributes) SetInstanceType(v string) *FleetAttributes {
	s.InstanceType = &v
	return s
}
782198
func (p *AuroraSchedulerManagerClient) AddInstances(ctx context.Context, key *InstanceKey, count int32) (r *Response, err error) {
  var _args143 AuroraSchedulerManagerAddInstancesArgs
  _args143.Key = key
  _args143.Count = count
  var _result144 AuroraSchedulerManagerAddInstancesResult
  if err = p.Client_().Call(ctx, "addInstances", &_args143, &_result144); err != nil {
    return
  }
  return _result144.GetSuccess(), nil
}
1046694
func (cg *Consumergroup) NewInstance() *ConsumergroupInstance {
	id, err := generateConsumerInstanceID()
	if err != nil {
		panic(err)
	}
	return cg.Instance(id)
}
500894
func (s *RDSInstanceDetails) SetInstanceType(v string) *RDSInstanceDetails {
	s.InstanceType = &v
	return s
}
1240795
func (s *LaunchTemplateOverrides) SetInstanceType(v string) *LaunchTemplateOverrides {
	s.InstanceType = &v
	return s
}
673129
func (i *IPAddressPerTask) AddGroup(group string) *IPAddressPerTask {
	if i.Groups == nil {
		i.EmptyGroups()
	}

	groups := *i.Groups
	groups = append(groups, group)
	i.Groups = &groups

	return i
}
676128
func (s *ListInstancesInput) SetInstanceGroupTypes(v []*string) *ListInstancesInput {
	s.InstanceGroupTypes = v
	return s
}
381959
func (s *ModifyInstanceGroupsInput) SetInstanceGroups(v []*InstanceGroupModifyConfig) *ModifyInstanceGroupsInput {
	s.InstanceGroups = v
	return s
}