// Returns the instance with the specified ID
975984
func (c *Cloud) getInstanceByID(instanceID string) (*ec2.Instance, error) {
	instances, err := c.getInstancesByIDs([]*string{&instanceID})
	if err != nil {
		return nil, err
	}

	if len(instances) == 0 {
		return nil, cloudprovider.ErrInstanceNotFound
	}
	if len(instances) > 1 {
		return nil, fmt.Errorf("multiple instances found for instance: %s", instanceID)
	}

	return instances[instanceID], nil
}
1190612
func (s *SliceQuery) Id(id int) *SliceQuery {
	s.id = &id
	return s
}
14028
func (session *Session) ID(id interface{}) *Session {
	session.Statement.Id(id)
	return session
}
1035139
func (m BinaryIntMapper) ID(ii ...interface{}) (rowIDs []int64, err error) {
	// TODO implement (have to redo the Mapper interface to return slice)
	return []int64{0}, nil
}
83007
func (s *IngestGetPipelineService) Id(id ...string) *IngestGetPipelineService {
	s.id = append(s.id, id...)
	return s
}
1293653
func InstanceID(ctx types.Context) (*types.InstanceID, error) {

	id, err := getURL(ctx, metadataID)
	if err != nil {
		return nil, err
	}

	region, err := getURL(ctx, metadataRegion)
	if err != nil {
		return nil, err
	}

	name, err := getURL(ctx, metadataName)
	if err != nil {
		return nil, err
	}

	return &types.InstanceID{
		ID:     id,
		Driver: dobs.Name,
		Fields: map[string]string{
			dobs.InstanceIDFieldRegion: region,
			dobs.InstanceIDFieldName:   name,
		},
	}, nil
}
1279869
func (m *MockInstance) ID() int {
	ret := m.ctrl.Call(m, "ID")
	ret0, _ := ret[0].(int)
	return ret0
}
1025752
func (p *PreReceiveHook) GetID() int64 {
	if p == nil || p.ID == nil {
		return 0
	}
	return *p.ID
}
542676
func GetInstanceID(
	ctx types.Context, config gofig.Config) (*types.InstanceID, error) {

	d := &driver{}
	d.Init(ctx, config)
	return d.getInstanceID()
}
578978
func (s *XPackWatcherPutWatchService) Id(id string) *XPackWatcherPutWatchService {
	s.id = id
	return s
}
593345
func (item *MoreLikeThisQueryItem) Id(id string) *MoreLikeThisQueryItem {
	item.id = id
	return item
}
707544
func (o *ociInstance) Id() instance.Id {
	return instance.Id(*o.raw.Id)
}
230507
func InstanceID(ctx types.Context) (*types.InstanceID, error) {

	// UUID can be obtained as descried in
	// https://azure.microsoft.com/en-us/blog/accessing-and-using-azure-vm-unique-id/
	// but this code will use hostname as ID

	hostname, err := os.Hostname()
	if err != nil {
		return nil, err
	}
	return &types.InstanceID{
		ID:     hostname,
		Driver: azureud.Name,
	}, nil
}
1087292
func (inst *environInstance) Id() instance.Id {
	return instance.Id(inst.base.Name)
}
173417
func (s *ExplainService) Id(id string) *ExplainService {
	s.id = id
	return s
}
776245
func MustInstanceID(ctx context.Context) *types.InstanceID {
	return ctx.Value(InstanceIDKey).(*types.InstanceID)
}
654329
func (i sigmaInstance) Id() instance.Id {
	id := instance.Id(i.server.UUID())
	logger.Tracef("sigmaInstance.Id: %s", id)
	return id
}