sedai.settings

class BaseSettings:

Base configuration settings for all resources. All resoruces managed by Sedai will have these settings.

availabilityMode: str

The availability mode of the resource. This setting determines if Sedai should autonomously manage the availability of the resource. Possible values: OFF, MANUAL, AUTO

  • OFF: Sedai will not manage the availability of the resource.
  • MANUAL: Sedai will give recommendations for the availability of the resource, but the user has to manually apply the recommendations.
  • AUTO: Sedai will autonomously manage the availability of the resource.
optimizationMode: str

The optimization mode of the resource. This setting determines if Sedai should autonomously optimize the resource. Possible values: OFF, MANUAL, AUTO

  • OFF: Sedai will not optimize the resource. This is also referred to as "DataPilot" mode.
  • MANUAL: Sedai will give recommendations for the optimization of the resource, but the user has to manually apply the recommendations. This mode is also referred to as "CoPilot" mode. The user has to manually approve the recommendations.
  • AUTO: Sedai will autonomously optimize the resource. This is also referred to as "AutoPilot" mode.
releaseIntelligenceMode: str

The release intelligence mode of the resource. This setting determines if Sedai should autonomously manage the releases of the resource. Possible values: OFF, MANUAL

  • OFF: Sedai will not monitor and score code and application releases.
  • MANUAL: Sedai will monitor and score code and application releases. A release score and a score card will be generated"
sloMode: str

Deprecated, Do not use.

sedaiSyncEnabled: bool

When Sedai Sync is enabled for a resource, Sedai will automatically sync the resource with the latest configuration.

src
class APPSettings(BaseSettings):

Settings for all appplication resources managed by Sedai. Applications could be web applictions or microservices behind a load balancer or identified by tags or labels. In containerized environments, applications could be workloads running in a container, pod, or a service.

isProd: bool

Is this resource or application in production. If an application is not a production application, Sedai can take more aggressive actions to optimize the application. In aggresive mode, some thresholds are relaxed. Also in non-prod mode, Sedai can act even if certain metrics are not available.

horizontalScaling_enabled: bool

Enable horizontal scaling for the application. Horizontal scaling is the process of adding or removing instances of an application to handle the load.

horizontalScaling_minReplicas: int

The minimum number of replicas for the application. This is the minimum number of instances that should be running at all times.

horizontalScaling_maxReplicas: int

The maximum number of replicas for the application. This is the maximum number of instances that can be running at any given time.

class ServerlessSettings(BaseSettings):

Base configuration settings for all resources. All resoruces managed by Sedai will have these settings.

optimizationFocus: str

The optimization focus for the serverless function. The optimization focus determines the goal of the optimization. Possible values: COST, DURATION, COST_AND_DURATION

  • COST: Optimize the cost of the function.
  • DURATION: Optimize the duration of the function.
  • COST_AND_DURATION: Optimize both the cost and duration of the function.
optimization_concurrencyMode: str

Should Sedai optimize the concurrency of the function. Possible values: OFF, MANUAL, AUTO

  • OFF: Sedai will not optimize the concurrency of the function.
  • MANUAL: Sedai will give recommendations for the concurrency of the function, but the user has to manually apply the recommendations.
  • AUTO: Sedai will autonomously optimize the concurrency of the function.

When set to AUTO. The actuak course of action will be determined wether the Lambda is a versioned or unversioned function. For versioned functions, Sedai will manage concurrecy by managing the provisioned concurrency. For unversioned functions, Sedai will add an extenstion to the Lambda and use it to manage the cold starts.

optimization_maxCostChangePercentage: int

When Sedai is optimizing for performance, what is the maximum percentage change in cost that is acceptable.

optimization_maxLatencyChangePercentage: int

When Sedai is optimizing for cost, what is the maximum percentage change in latency that is acceptable.

telemetryLoggingEnabled: bool

Do not use. This setting is deprecated.

class ContainerAppSettings(APPSettings):

Common settings for all containerized applications. Containerized applications could be running in a container, pod, or a service.

autonomousActionWithoutTraffic: bool

If an application is marked as not in production (with isProd set to false), , Sedai can take more aggressive actions to optimize the application even if performance or traffic metrics are not available.

optimization_Focus: str

The optimization focus for the containerized application. The optimization focus determines the goal of the optimization. Possible values: COST, DURATION, COST_AND_DURATION

  • COST: Optimize the cost of the application.
  • DURATION: Optimize the duration of the application.
  • COST_AND_DURATION: Optimize both the cost and duration of the application.
optimization_maxLatencyIncreasePct: int

When Sedai is optimizing for cost, what is the maximum percentage increase in latency that is acceptable.

optimization_maxCPUIncreasePct: int

When Sedai is optimizing for performance, what is the maximum percentage increase in CPU that is acceptable.

optimization_maxMemoryIncreasePct: int

When Sedai is optimizing for performance, what is the maximum percentage increase in memory that is acceptable.

verticalScaling_enabled: bool

Enable vertical scaling for the application. Vertical scaling is the process of increasing or decreasing the resources of an instance of an application.

predictiveScaling_enabled: bool

Enable predictive scaling for the application. Predictive scaling is the process of predicting the load, performance and resource requirements of an application based on the application's seasonalit models and scaling the resources accordingly.

class KubeAppSettings(ContainerAppSettings):

Settings for all Kubernetes applications managed by Sedai. Kubernetes applications are containerized applications running in a Kubernetes cluster. This could be a pod, deployment, or a service such as a deployment, statefulset, or daemonset.

isOperationAllowed: bool

Is the operation allowed for the Kubernetes application. If the operation is not allowed, Sedai will not be able to take any actions on the application.

horizontalScaling_replicaMultiplier: int

The replica multiplier for the Kubernetes application. The replica multiplier is the factor by which the number of replicas of the application should be multiplied to handle the load.

verticalScaling_minPerContainerCpuInCores: float

The minimum CPU required per container in the Kubernetes application. This is the minimum amount of CPU that should be allocated to each container.

class ECSAppSettings(ContainerAppSettings):

Settings for all ECS applications managed by Sedai. ECS applications are containerized applications running in an ECS cluster. This could be a task, service, or a container running in an ECS cluster.

serviceAutoscalingEnabled: bool

Enable service autoscaling for the ECS application. Service autoscaling is the process of automatically scaling the resources of the service based on the load and performance metrics of the service.

verticalScaling_minCpu: float

The minimum CPU required for the ECS application. This is the minimum amount of CPU that should be allocated to the application.

verticalScaling_minMemory: float

The minimum memory required for the ECS application. This is the minimum amount of memory that should be allocated to the application.

class BucketSettings(BaseSettings):

Settings for all storage buckets managed by Sedai. Storage buckets are used to store self.src and files in the cloud.

class VolumeSettings(BaseSettings):

Settings for all storage volumes managed by Sedai. Storage volumes are used to store self.src and files in the cloud.

class Settings:

Settings for all resources managed by Sedai. This setting configuration is for a set of resources, grouped either in a group in Sedai or at the level of the account or cluster.

app_settings: APPSettings

The settings for all application resources.

serverless_settings: ServerlessSettings

The settings for all serverless resources.

kube_app_settings: KubeAppSettings

The settings for all Kubernetes application resources.

ecs_app_settings: ECSAppSettings

The settings for all ECS application resources.

bucket_settings: BucketSettings

The settings for all storage bucket resources.

volume_settings: VolumeSettings

The settings for all storage volume resources.

src
def get_resource_settings(resource_id):

Get the settings for a resource with the given resource ID. The returned settings object will be of the appropriate type based on the type of the resource.

Parameters
  • resource_id: The ID of the resource.
Returns

The settings for the resource.

def update_resource_settings(resource_id, settings):

Update the settings for a resource with the given resource ID. The settings object should be of the appropriate type based on the type of the resource.

Parameters
  • resource_id: The ID of the resource.
  • settings: The settings for the resource.
Returns

True if the settings were updated successfully, False otherwise.

Raises
  • Exception if the settings could not be updated.
def get_group_settings(group_id):

Get the settings for a group with the given group ID.

Parameters
  • group_id: The ID of the group.
Returns

A settings object containing the settings for the group.

def update_group_settings(group_id, settings):

Update the settings for a group with the given group ID.

Parameters
  • group_id: The ID of the group.
  • settings: The settings for the group.
Returns

True if the settings were updated successfully, False otherwise.

Raises
  • Exception if the settings could not be updated.
def initialize_group_settings(group_id):

Initialize the settings for a group with the given group ID. When a group is created, the settings for the group need to be initialized before they can be updated.

Parameters
  • group_id: The ID of the group.
Returns

True if the settings were initialized successfully, False otherwise.

Raises
  • Exception if the settings could not be initialized.
def enable_group_for_settings(group_id: str) -> bool:

Enables the settings for a group with the given group ID.

Parameters
  • group_id: The ID of the group.
Returns

True if the settings were enabled successfully, False otherwise.

Raises
  • Exception if the settings could not be enabled.
def disable_group_for_settings(group_id: str) -> bool:

Disables the settings for a group with the given group ID.

Parameters
  • group_id: The ID of the group.
Returns

True if the settings were disabled successfully, False otherwise.

Raises
  • Exception if the settings could not be disabled.
def get_account_settings(account_id):

Get the settings for an account with the given account ID.

Parameters
  • account_id: The ID of the account.
Returns

The settings for the account.

def update_account_settings(account_id, settings):

Update the settings for an account with the given account ID.

Parameters
  • account_id: The ID of the account.
  • settings: The settings for the account.
Returns

True if the settings were updated successfully, False otherwise.

Raises
  • Exception if the settings could not be updated.
def disable_account_monitoring(account_id: str):

Disable monitoring for an account with the given account ID.

Parameters
  • account_id: The ID of the account.
def disable_group_monitoring(group_id: str):

Disable monitoring for the group with the given group ID.

Parameters
  • group_id: The ID of the group.
def disable_resource_monitoring(resource_id: str):

Disable monitoring for a resource with the given resource ID.

Parameters
  • resource_id: The ID of the resource.