roboto.domain.actions.action_record#

Module Contents#

class roboto.domain.actions.action_record.Accessibility#

Bases: str, enum.Enum

Controls who can query for and invoke an action.

Accessibility levels determine the visibility and usability of actions within the Roboto platform. Actions can be private to an organization or published publicly in the Action Hub.

Future accessibility levels may include: “user” and/or “team”.

ActionHub = 'action_hub'#

All users of Roboto can query for and invoke the action.

Organization = 'organization'#

All members of the organization owning the Action can query for and invoke the action.

class roboto.domain.actions.action_record.ActionParameter(/, **data)#

Bases: pydantic.BaseModel

A parameter that can be provided to an Action at invocation time.

Action parameters allow customization of action behavior without modifying the action itself. Parameters can be required or optional, have default values, and include descriptions for documentation.

Parameters are validated when an action is invoked, ensuring that required parameters are provided and that values conform to expected types.

Parameters:

data (Any)

default: Any | None = None#

Default value applied for parameter if it is not required and no value is given at invocation.

Accepts any default value, but coerced to a string.

description: str | None = None#

Human-readable description of the parameter.

model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str#

Name of the parameter.

required: bool = False#

Whether this parameter is required at invocation time.

classmethod validate_default(v)#
Parameters:

v (Optional[Any])

Return type:

Optional[str]

class roboto.domain.actions.action_record.ActionParameterChangeset(/, **data)#

Bases: pydantic.BaseModel

A changeset used to modify Action parameters.

Parameters:

data (Any)

class Builder#
build()#
Return type:

ActionParameterChangeset

put_parameter(parameter)#
Parameters:

parameter (ActionParameter)

Return type:

ActionParameterChangeset

remove_parameter(parameter_name)#
Parameters:

parameter_name (str)

Return type:

ActionParameterChangeset

is_empty()#
Return type:

bool

put_parameters: list[ActionParameter] = None#

Parameters to add or update.

remove_parameters: list[str] = None#

Names of parameters to remove.

class roboto.domain.actions.action_record.ActionRecord(**kwargs)#

Bases: pydantic.BaseModel

A wire-transmissible representation of an action.

accessibility: Accessibility#
compute_digest()#
Return type:

str

compute_requirements: ComputeRequirements | None = None#
container_parameters: ContainerParameters | None = None#
created: datetime.datetime#
created_by: str#
description: str | None = None#
digest: str | None = None#
inherits: ActionReference | None = None#
metadata: dict[str, Any] = None#
modified: datetime.datetime#
modified_by: str#
name: str#
org_id: str#
parameters: list[ActionParameter] = None#
published: datetime.datetime | None = None#
property reference: ActionReference#
Return type:

ActionReference

requires_downloaded_inputs: bool | None = None#
serialize_metadata(metadata)#
Parameters:

metadata (dict[str, Any])

Return type:

roboto.types.UserMetadata

short_description: str | None = None#
tags: list[str] = None#
timeout: int | None = None#
uri: str | None = None#
class roboto.domain.actions.action_record.ActionReference(/, **data)#

Bases: pydantic.BaseModel

Qualified action reference.

Parameters:

data (Any)

digest: str | None = None#
name: str#
owner: str | None = None#
class roboto.domain.actions.action_record.ComputeRequirements(/, **data)#

Bases: pydantic.BaseModel

Compute requirements for an action invocation.

Parameters:

data (Any)

gpu: Literal[False] = False#
memory: int = 1024#
model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

storage: int = 21#
vCPU: int = 512#
validate_storage_limit()#
validate_vcpu_mem_combination()#
Return type:

ComputeRequirements

class roboto.domain.actions.action_record.ContainerParameters(/, **data)#

Bases: pydantic.BaseModel

Container parameters for an action invocation.

Parameters:

data (Any)

command: list[str] | None = None#
entry_point: list[str] | None = None#
env_vars: dict[str, str] | None = None#
model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

workdir: str | None = None#
class roboto.domain.actions.action_record.ExecutorContainer#

Bases: enum.Enum

Type of container running as part of an action invocation

Action = 'action'#
LogRouter = 'firelens_log_router'#
Monitor = 'monitor'#
OutputHandler = 'output_handler'#
Setup = 'setup'#