func updateConnection(d *schema.ResourceData, m interface{}) error {
    c := expandConnection(d)
    api := m.(*management.Management)
    err := api.Connection.Update(d.Id(), c)
    if err != nil {