Rule🔗
Definition🔗
class Rule implements \JsonSerializable
{
/**
* @var array<string, string>|null
*/
public ?array $annotations;
public string $condition;
/**
* @var array<\Grafana\Foundation\Alerting\Query>
*/
public array $data;
public \Grafana\Foundation\Alerting\RuleExecErrState $execErrState;
public string $folderUID;
/**
* The amount of time, in seconds, for which the rule must be breached for the rule to be considered to be Firing.
* Before this time has elapsed, the rule is only considered to be Pending.
*/
public string $for;
public ?int $id;
public ?bool $isPaused;
/**
* @var array<string, string>|null
*/
public ?array $labels;
public \Grafana\Foundation\Alerting\RuleNoDataState $noDataState;
public ?\Grafana\Foundation\Alerting\NotificationSettings $notificationSettings;
public int $orgID;
public string $provenance;
public ?\Grafana\Foundation\Alerting\RecordRule $record;
public string $ruleGroup;
public string $title;
public ?string $uid;
public ?string $updated;
}
Methods🔗
fromArray🔗
Builds this object from an array.
This function is meant to be used with the return value of json_decode($json, true)
.
jsonSerialize🔗
Returns the data representing this object, preparing it for JSON serialization with json_encode()
.