Exemplo n.º 1
0
func descInstanceHealth(instanceIds []elb.Instance, cli *elb.ELB) {
	for _, instance := range instanceIds {
		instanceid := elb.Instance{}
		instanceid.InstanceID = instance.InstanceID
		instances := elb.DescribeEndPointStateInput{Instances: []elb.Instance{instanceid}}
		resp, _ := cli.DescribeInstanceHealth(&instances)
		fmt.Println(*instance.InstanceID, resp.InstanceState)
		fmt.Println(reflect.TypeOf(resp))
	}
}
Exemplo n.º 2
0
func getInstanceHealth(InstanceIds []elb.Instance, cli **elb.ELB) { //(*elb.DescribeInstanceHealthResult, error) {
	for _, instance := range InstanceIds {
		id := elb.Instance{}
		id.InstanceID = instance.InstanceID
		instances := elb.DescribeEndPointStateInput{Instances: []elb.Instance{id}}
		resp, _ := cli.DescribeInstanceHealth(&instances)
		fmt.Println(*instance.InstanceID, resp)
	}
	//  return resp, err
}