Skip to content

AdHocVariable🔗

Constructor🔗

AdHocVariable(name: str)

Methods🔗

build🔗

Builds the object.

def build() -> dashboard.VariableModel

allow_custom_value🔗

Allow custom values to be entered in the variable

def allow_custom_value(allow_custom_value: bool) -> typing.Self

datasource🔗

Data source used to fetch values for a variable. It can be defined but null.

def datasource(datasource: common.DataSourceRef) -> typing.Self

definition🔗

def definition(definition: str) -> typing.Self

description🔗

Description of variable. It can be defined but null.

def description(description: str) -> typing.Self

hide🔗

Visibility configuration for the variable

def hide(hide: dashboard.VariableHide) -> typing.Self

label🔗

Optional display name

def label(label: str) -> typing.Self

name🔗

Name of variable

def name(name: str) -> typing.Self

static_options🔗

Additional static options for query variable

def static_options(static_options: list[dashboard.VariableOption]) -> typing.Self

static_options_order🔗

Ordering of static options in relation to options returned from data source for query variable

def static_options_order(static_options_order: typing.Literal["before", "after", "sorted"]) -> typing.Self

See also🔗