'Example API', 'url' => 'https://api.example.com/health', 'periodicity' => Periodicity::PERIODICITY_1M, 'method' => HTTPMethod::HTTP_METHOD_GET, 'regions' => [ Region::REGION_FLY_AMS, Region::REGION_FLY_IAD, Region::REGION_FLY_SYD, ], 'active' => true, 'status_code_assertions' => [ new StatusCodeAssertion([ 'comparator' => NumberComparator::NUMBER_COMPARATOR_EQUAL, 'target' => 200, ]), ], ]); $response = $client->monitor->v1->monitorService->createHTTPMonitor( new CreateHTTPMonitorRequest(['monitor' => $monitor]), ); $created = $response->getMonitor(); if ($created !== null) { printf("Created monitor %s (%s)\n", $created->getId(), $created->getName()); }