Skip to content

Nexthink settings

nexthink_api.Models.NxtSettings

Bases: BaseModel

Configuration class for Nexthink API.

This class is used by client during initialization.

Attributes

instance : str
    The name of the Nexthink instance.
region : NxtRegionName
    The region of the Nexthink instance.
infinity_base_uri : HttpUrl
    The base URI of the Nexthink API.
token_url : HttpUrl
    The URL of the token endpoint.
proxies : Optional[dict]
    A dictionary of proxies to use for the requests. Defaults to None.
Note
  • if proxy are not provided, it will try to detect proxies from environment variables
  • if no proxy are detected, it will disable the proxy
  • false value disable the proxy

base_url: Final = 'https://{instance}.api.{region}.nexthink.cloud' class-attribute instance-attribute

instance: str = Field(min_length=1) class-attribute instance-attribute

region: NxtRegionName instance-attribute

infinity_base_uri: HttpUrl = Field(init=False, default=None) class-attribute instance-attribute

token_url: HttpUrl = Field(init=False, default=None) class-attribute instance-attribute

proxies: Optional[Union[Dict[str, str], bool]] = None class-attribute instance-attribute

set_infinity_base_uri(values: dict) -> dict classmethod

Set the base URI of the Nexthink API.

Parameters
values : dict
    class attributes in dict format
Returns
dict
    The validated and updated attributes in dict format.
Raises
ValueError
    If instance or region are not provided.

set_settings_init() -> Self

Finish the initialization of the settings object when class is instantiated.

Returns
NxtSettings
    the instantiated class