sedai.settings_history

class SettingsEventType(enum.Enum):

Represents the type of event.

This enum categorizes the different types of changes that can occur to settings for resources, groups or accounts.

CUSTOM_SETTINGS_CREATE = <SettingsEventType.CUSTOM_SETTINGS_CREATE: 'CUSTOM_SETTINGS_CREATE'>

Custom settings for this resource/group/account created.

CUSTOM_SETTINGS_UPDATE = <SettingsEventType.CUSTOM_SETTINGS_UPDATE: 'CUSTOM_SETTINGS_UPDATE'>

Custom settings for this resource/group/account updated.

CUSTOM_SETTINGS_RESET = <SettingsEventType.CUSTOM_SETTINGS_RESET: 'CUSTOM_SETTINGS_RESET'>

Custom settings for this resource/group/account reset.

class SettingChangeDetails:

Represents the details of the change made in some field for a particular setting type.

setting_key: str

The setting field that was modified.

description: str

Description of the setting modified.

initial_value: Any

Original value before modification.

new_value: Any

Final value after modification.

class SettingsChangeEvent:

Represents a change in the settings for an entity (resource, group or account), including the type of change, who made the change, when it occured and what specific settings were modified.

event_type: SettingsEventType

Type of modification.

updated_user: str

Which user performed the modification.

updated_time: datetime.datetime

Time at which the modification was performed.

updated_settings: List[SettingChangeDetails]

List of modified fields.

def get_resource_settings_history( resource_id: str, start_time: Optional[datetime.datetime] = None, end_time: Optional[datetime.datetime] = None) -> List[SettingsChangeEvent]:

Retrieve the history of settings changes for a particular resource.

def get_group_settings_history( group_id: str, start_time: Optional[datetime.datetime] = None, end_time: Optional[datetime.datetime] = None) -> List[SettingsChangeEvent]:

Retrieve the history of settings changes for a particular group.

def get_account_settings_history( account_id: str, start_time: Optional[datetime.datetime] = None, end_time: Optional[datetime.datetime] = None) -> List[SettingsChangeEvent]:

Retrieve the history of settings changes for a particular account.