More logs. describe fails.

This commit is contained in:
Jan Mußler 2020-12-09 15:37:44 +01:00
parent 7a89a7c39f
commit b2e390ce20
1 changed files with 5 additions and 1 deletions

View File

@ -68,16 +68,20 @@ func (r *EBSVolumeResizer) DescribeVolumes(volumeIds []string) ([]VolumeProperti
}
volumeOutput, err := r.connection.DescribeVolumes(&ec2.DescribeVolumesInput{VolumeIds: aws.StringSlice((volumeIds))})
if err != nil {
return nil, err
}
fmt.Printf("%v", volumeOutput)
p := []VolumeProperties{}
if nil == volumeOutput.Volumes {
return p, nil
}
for _, v := range volumeOutput.Volumes {
p = append(p, VolumeProperties{VolumeID: *v.VolumeId, Size: *v.Size, VolumeType: *v.VolumeType, Iops: *v.Iops, Throughput: *v.Throughput})
}
return p, nil
}