## List Monitor Groups `client.LoadBalancers.MonitorGroups.List(ctx, query) (*SinglePage[MonitorGroup], error)` **get** `/accounts/{account_id}/load_balancers/monitor_groups` List configured monitor groups. ### Parameters - `query MonitorGroupListParams` - `AccountID param.Field[string]` Identifier. ### Returns - `type MonitorGroup struct{…}` - `ID string` The ID of the Monitor Group to use for checking the health of origins within this pool. - `Description string` A short description of the monitor group - `Members []MonitorGroupMember` List of monitors in this group - `Enabled bool` Whether this monitor is enabled in the group - `MonitorID string` The ID of the Monitor to use for checking the health of origins within this pool. - `MonitoringOnly bool` Whether this monitor is used for monitoring only (does not affect pool health) - `MustBeHealthy bool` Whether this monitor must be healthy for the pool to be considered healthy - `CreatedAt Time` The timestamp of when the monitor was added to the group - `UpdatedAt Time` The timestamp of when the monitor group member was last updated - `CreatedAt Time` The timestamp of when the monitor group was created - `UpdatedAt Time` The timestamp of when the monitor group was last updated ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/load_balancers" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) page, err := client.LoadBalancers.MonitorGroups.List(context.TODO(), load_balancers.MonitorGroupListParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "result": [ { "id": "id", "description": "Primary datacenter monitors", "members": [ { "enabled": true, "monitor_id": "monitor_id", "monitoring_only": false, "must_be_healthy": true, "created_at": "2014-01-01T05:20:00.12345Z", "updated_at": "2014-01-01T05:20:00.12345Z" } ], "created_at": "2014-01-01T05:20:00.12345Z", "updated_at": "2014-01-01T05:20:00.12345Z" } ], "success": true, "result_info": { "count": 20, "page": 1, "per_page": 20, "total_count": 2000, "total_pages": 100 } } ```