---
sidebar:
  hidden: true
title: roboto.domain.actions.action
---
## Module Contents

### Action

```python
class roboto.domain.actions.action.Action(
    record: roboto.domain.actions.action_record.ActionRecord,
    roboto_client: Optional[roboto.http.RobotoClient] = None,
)
```

`from roboto import Action`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/action.py#L54-L765)

An action: a reusable function to process, transform or analyze data in Roboto.

An action runs a container image with the compute requirements, container parameters, and timeout it sets, and each invocation can give values for its parameters. A user invokes it with `invoke`, or a trigger invokes it automatically; each run is an [`Invocation`](/docs/reference/python-sdk/roboto/domain/actions/invocation#roboto.domain.actions.invocation.Invocation). An action belongs to one organization, and its accessibility says whether only that organization's members can find and invoke it, or every Roboto user can, through the Action Hub.

Get an `Action` from `create`, `from_name`, or `query`. Each instance holds a copy of one version of the action's record: methods that change the action update that copy from Roboto's response.

**Parameters**

- **record** (`roboto.domain.actions.action_record.ActionRecord`)
- **roboto_client** (`Optional[roboto.http.RobotoClient]`)

**Properties**

- **Action.accessibility** (`roboto.domain.actions.action_record.Accessibility`): Who can find and invoke the action.

- **Action.compute_requirements** (`roboto.domain.actions.action_record.ComputeRequirements | None`): CPU, memory and storage for each invocation of the action, or `None` if none were set.

  [`compute_requirements`](/docs/reference/python-sdk/roboto/domain/actions/action_record#roboto.domain.actions.action_record.ActionRecord.compute_requirements) says what can override them.

  Return type: `Optional[roboto.domain.actions.action_record.ComputeRequirements]`

- **Action.container_parameters** (`roboto.domain.actions.action_record.ContainerParameters | None`): How to run the action's container image.

  [`container_parameters`](/docs/reference/python-sdk/roboto/domain/actions/action_record#roboto.domain.actions.action_record.ActionRecord.container_parameters) says what can override them.

  Return type: `Optional[roboto.domain.actions.action_record.ContainerParameters]`

- **Action.created** (`datetime.datetime`): Time the action was created.

- **Action.created_by** (`str`): ID of the user who created the action.

- **Action.description** (`str | None`): Human-readable description of the action, or `None` if it has none.

  Return type: `Optional[str]`

- **Action.digest** (`str`): Digest that identifies this version of the action.

  [`digest`](/docs/reference/python-sdk/roboto/domain/actions/action_record#roboto.domain.actions.action_record.ActionRecord.digest) says where it comes from when the record has none.

- **Action.inherits_from** (`roboto.domain.actions.action_record.ActionReference | None`): Deprecated. Action this action inherits its configuration from.

  Read the configuration from the action's own properties, such as `compute_requirements` and `uri`, instead. [`inherits`](/docs/reference/python-sdk/roboto/domain/actions/action_record#roboto.domain.actions.action_record.ActionRecord.inherits) says when Roboto rejects it.

  Return type: `Optional[roboto.domain.actions.action_record.ActionReference]`

- **Action.metadata** (`dict[str, Any]`): Key-value metadata on the action.

  [`metadata`](/docs/reference/python-sdk/roboto/domain/actions/action_record#roboto.domain.actions.action_record.ActionRecord.metadata) says which values it may hold.

- **Action.modified** (`datetime.datetime`): Time the action was last modified.

- **Action.modified_by** (`str`): ID of the user who last modified the action.

- **Action.name** (`str`): Human-readable name of the action, unique within its organization.

- **Action.org_id** (`str`): ID of the organization that owns the action.

- **Action.parameters** (`collections.abc.Sequence[roboto.domain.actions.action_record.ActionParameter]`): Copies of the parameters that an invocation of the action can give values for.

- **Action.published** (`datetime.datetime | None`): Time the action was published to the Action Hub, or `None` if it is not in the Action Hub.

  Return type: `Optional[datetime.datetime]`

- **Action.record** (`roboto.domain.actions.action_record.ActionRecord`): Record of the action that this instance holds.

- **Action.requires_downloaded_inputs** (`bool`): Whether Roboto downloads an invocation's input files before the action runs.

  `True` unless the action sets it to `False`.

- **Action.short_description** (`str | None`): Brief description of the action, or `None` if it has none.

  [`short_description`](/docs/reference/python-sdk/roboto/domain/actions/action_record#roboto.domain.actions.action_record.ActionRecord.short_description) gives its maximum length.

  Return type: `Optional[str]`

- **Action.tags** (`list[str]`): Tags on the action.

- **Action.timeout** (`int | None`): Maximum time an invocation of the action may run, in minutes, or `None` if the action sets none.

  Return type: `Optional[int]`

- **Action.uri** (`str | None`): URI of the container image the action runs, or `None` if none was set.

  Return type: `Optional[str]`

#### Action.create()

```python
@classmethod
def create(
    name: str,
    compute_requirements: Optional[roboto.domain.actions.action_record.ComputeRequirements] = None,
    container_parameters: Optional[roboto.domain.actions.action_record.ContainerParameters] = None,
    description: Optional[str] = None,
    inherits: Optional[roboto.domain.actions.action_record.ActionReference] = None,
    metadata: Optional[dict[str, Any]] = None,
    parameters: Optional[list[roboto.domain.actions.action_record.ActionParameter]] = None,
    requires_downloaded_inputs: Optional[bool] = None,
    short_description: Optional[str] = None,
    tags: Optional[list[str]] = None,
    timeout: Optional[int] = None,
    uri: Optional[str] = None,
    caller_org_id: Optional[str] = None,
    roboto_client: Optional[roboto.http.RobotoClient] = None,
) -> Action
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/action.py#L71-L182)

Create an action.

**Parameters**

- **name** (`str`): Human-readable name of the action, unique within its organization. Letters, digits, underscores, and dashes only.
- **compute_requirements** (`Optional[roboto.domain.actions.action_record.ComputeRequirements]`): CPU, memory, and storage for each invocation of the action. `None` uses the defaults of [`ComputeRequirements`](/docs/reference/python-sdk/roboto/domain/actions/action_record#roboto.domain.actions.action_record.ComputeRequirements).
- **container_parameters** (`Optional[roboto.domain.actions.action_record.ContainerParameters]`): Command, entry point, environment variables, and working directory for the action's container. `None` sets none of them.
- **description** (`Optional[str]`): Human-readable description of the action.
- **inherits** (`Optional[roboto.domain.actions.action_record.ActionReference]`): Deprecated. Roboto rejects a request that sets it; set the configuration on the action itself.
- **metadata** (`Optional[dict[str, Any]]`): Key-value metadata to set on the action. `None` sets none.
- **parameters** (`Optional[list[roboto.domain.actions.action_record.ActionParameter]]`): Parameters an invocation of the action can give values for. `None` sets none.
- **requires_downloaded_inputs** (`Optional[bool]`): Whether Roboto downloads an invocation's input files into the action's container before it runs. `None` means `True`.
- **short_description** (`Optional[str]`): Brief human-readable description of the action, at most 140 characters (`SHORT_DESCRIPTION_LENGTH`).
- **tags** (`Optional[list[str]]`): Tags to set on the action. `None` sets none.
- **timeout** (`Optional[int]`): Maximum time, in minutes, an invocation of the action may run before Roboto stops it. `None` uses Roboto's default.
- **uri** (`Optional[str]`): URI of the container image the action runs, such as `"ubuntu:latest"`. An action without one cannot be invoked.
- **caller_org_id** (`Optional[str]`): Organization to create the action in. Required when the caller belongs to more than one organization; otherwise the caller's only organization.
- **roboto_client** (`Optional[roboto.http.RobotoClient]`): Client to make requests to Roboto with. Defaults to one configured from the environment, by [`from_env()`](/docs/reference/python-sdk/roboto/http/roboto_client#roboto.http.roboto_client.RobotoClient.from_env).

**Returns**

- `Action`: The new action.

**Raises**

- [`RobotoIllegalArgumentException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoIllegalArgumentException): `short_description` is longer than 140 characters. Raised before any request.
- [`RobotoConflictException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoConflictException): The organization already has an action with this name.
- [`RobotoInvalidRequestException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoInvalidRequestException): `inherits` is set, two parameters share a name, or a required parameter has a default.
- [`RobotoLimitExceededException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoLimitExceededException): The organization has as many actions as its plan allows, or `timeout` is above the organization's limit.

**Usage**

Create an action that runs a public image:

```python
action = Action.create(
    name="hello_world", uri="ubuntu:latest", description="A simple hello world action"
)
```

Create an action with parameters and compute requirements:

```python
from roboto.domain.actions import ComputeRequirements, ActionParameter
action = Action.create(
    name="data_processor",
    uri="my-registry.com/processor:v1.0",
    description="Processes sensor data with configurable parameters",
    compute_requirements=ComputeRequirements(vCPU=4096, memory=8192),
    parameters=[
        ActionParameter(name="threshold", required=True, description="Processing threshold"),
        ActionParameter(name="output_format", default="json", description="Output format"),
    ],
    tags=["data-processing", "sensors"],
    timeout=60,
)
```

#### Action.delete()

```python
def delete() -> None
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/action.py#L456-L469)

Delete this action and every version of it.

An action in the Action Hub is removed from it first. Deleting an action that no longer exists succeeds and changes nothing.

**Usage**

```python
action = Action.from_name("old_action")
action.delete()
```

**Returns**

- `None`

#### Action.from_name()

```python
@classmethod
def from_name(
    name: str,
    digest: Optional[str] = None,
    owner_org_id: Optional[str] = None,
    roboto_client: Optional[roboto.http.RobotoClient] = None,
) -> Action
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/action.py#L185-L234)

Fetch an action by name.

Action names are unique within an organization, so a name and an organization identify one action.

**Parameters**

- **name** (`str`): Name of the action.
- **digest** (`Optional[str]`): Digest of the version to fetch. `None` fetches the latest version.
- **owner_org_id** (`Optional[str]`): Organization that owns the action. Defaults to the organization the caller acts in. Name another organization to fetch one of its actions in the Action Hub.
- **roboto_client** (`Optional[roboto.http.RobotoClient]`): Client to make requests to Roboto with. Defaults to one configured from the environment, by [`from_env()`](/docs/reference/python-sdk/roboto/http/roboto_client#roboto.http.roboto_client.RobotoClient.from_env).

**Raises**

- [`RobotoNotFoundException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoNotFoundException): The organization has no action with this name, or the action has no version with this `digest`.

**Returns**

- `Action`

**Usage**

Load the latest version of an action:

```python
action = Action.from_name("data_processor")
```

Load a specific version of an action:

```python
action = Action.from_name("data_processor", digest="abc123def456")
```

Load an action in the Action Hub that another organization owns:

```python
action = Action.from_name("ros_ingestion", owner_org_id="roboto-public")
```

#### Action.invoke()

```python
def invoke(
    invocation_source: roboto.domain.actions.invocation_record.InvocationSource,
    data_source_id: Optional[str] = None,
    data_source_type: Optional[roboto.domain.actions.invocation_record.InvocationDataSourceType] = None,
    input_data: Optional[Union[list[str], roboto.domain.actions.invocation_record.InvocationInput]] = None,
    upload_destination: Optional[roboto.domain.actions.invocation_record.InvocationUploadDestination] = None,
    compute_requirement_overrides: Optional[roboto.domain.actions.action_record.ComputeRequirements] = None,
    container_parameter_overrides: Optional[roboto.domain.actions.action_record.ContainerParameters] = None,
    idempotency_id: Optional[str] = None,
    invocation_source_id: Optional[str] = None,
    parameter_values: Optional[dict[str, Any]] = None,
    timeout: Optional[int] = None,
    caller_org_id: Optional[str] = None,
) -> roboto.domain.actions.invocation.Invocation
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/action.py#L471-L612)

Start a run of the version of this action this instance holds.

The invocation is queued to run in the caller's organization, which may differ from the organization that owns the action when the action is in the Action Hub.

**Parameters**

- **invocation_source** (`roboto.domain.actions.invocation_record.InvocationSource`): Whether a user or a trigger starts the invocation. Only Roboto can create invocations with source [`Trigger`](/docs/reference/python-sdk/roboto/domain/actions/invocation_record#roboto.domain.actions.invocation_record.InvocationSource.Trigger).
- **data_source_id** (`Optional[str]`): ID of the dataset the invocation reads from. Required when `input_data` is a list of patterns. `None` names no data source.
- **data_source_type** (`Optional[roboto.domain.actions.invocation_record.InvocationDataSourceType]`): Type of the data source that `data_source_id` names. [`Dataset`](/docs/reference/python-sdk/roboto/domain/actions/invocation_record#roboto.domain.actions.invocation_record.InvocationDataSourceType.Dataset) is the only type, and `None` uses it.
- **input_data** (`Optional[Union[list[str], roboto.domain.actions.invocation_record.InvocationInput]]`): Gitignore-style patterns for the files in the `data_source_id` dataset to read, or an [`InvocationInput`](/docs/reference/python-sdk/roboto/domain/actions/invocation_record#roboto.domain.actions.invocation_record.InvocationInput) that selects files, topics, or sessions. `None` or an empty list selects no inputs.
- **upload_destination** (`Optional[roboto.domain.actions.invocation_record.InvocationUploadDestination]`): Dataset to upload the files the invocation writes to its output directory to. `None` uploads them to the dataset the invocation's input files and topics come from when they all come from one, and otherwise not at all.
- **compute_requirement_overrides** (`Optional[roboto.domain.actions.action_record.ComputeRequirements]`): Compute requirements, such as vCPU and memory, that replace the action's own. Fields left unset keep the action's values; `None` keeps them all.
- **container_parameter_overrides** (`Optional[roboto.domain.actions.action_record.ContainerParameters]`): Container parameters, such as the entry point and environment variables, that replace the action's own. Fields left unset keep the action's values; `None` keeps them all.
- **idempotency_id** (`Optional[str]`): ID that no other invocation may share, so retrying a request never runs the action twice. `None` sets no such ID.
- **invocation_source_id** (`Optional[str]`): ID of the user or trigger that starts the invocation. On an [`Manual`](/docs/reference/python-sdk/roboto/domain/actions/invocation_record#roboto.domain.actions.invocation_record.InvocationSource.Manual) invocation, Roboto replaces it with the caller's user ID.
- **parameter_values** (`Optional[dict[str, Any]]`): Values for the action's parameters, keyed by parameter name. Roboto converts each value to a string, and gives each parameter left out its default.
- **timeout** (`Optional[int]`): Maximum time the invocation may run, in minutes. `None` uses the action's timeout, or Roboto's default when the action has none.
- **caller_org_id** (`Optional[str]`): Organization to create the invocation in. Required when the caller belongs to more than one organization; otherwise the caller's only organization.

**Returns**

- `roboto.domain.actions.invocation.Invocation`: The new invocation, with status [`Queued`](/docs/reference/python-sdk/roboto/domain/actions/invocation_record#roboto.domain.actions.invocation_record.InvocationStatus.Queued).

**Raises**

- [`RobotoIllegalArgumentException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoIllegalArgumentException): `input_data` is a non-empty list and `data_source_id` is not set. Raised before any request.
- [`RobotoConflictException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoConflictException): Another invocation already has this `idempotency_id`.
- [`RobotoInvalidRequestException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoInvalidRequestException): The action has no container image URI, `parameter_values` leaves out a required parameter, `upload_destination` is not a dataset, or the `data_source_id` dataset does not exist or has no files that match `input_data`.
- [`RobotoLimitExceededException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoLimitExceededException): The compute requirements or `timeout` are above the organization's limits, or the organization has used up its compute credits.

**Usage**

Ingest a dataset's ROS bag files with an action from the Action Hub, and wait for it to finish:

```python
from roboto import (
    Action,
    InvocationDataSourceType,
    InvocationSource,
    InvocationUploadDestination,
)
action = Action.from_name("ros_ingestion", owner_org_id="roboto-public")
iv = action.invoke(
    invocation_source=InvocationSource.Manual,
    data_source_id="ds_12345",
    data_source_type=InvocationDataSourceType.Dataset,
    input_data=["**/*.bag"],
    upload_destination=InvocationUploadDestination.dataset("ds_12345"),
)
iv.wait_for_terminal_status()
```

Invoke an action with a parameter value and more compute than the action asks for, then print the status it ends in:

```python
from roboto import Action, InvocationSource, ComputeRequirements
action = Action.from_name("data_processor")
compute_reqs = ComputeRequirements(vCPU=4096, memory=8192)
iv = action.invoke(
    invocation_source=InvocationSource.Manual,
    compute_requirement_overrides=compute_reqs,
    parameter_values={"threshold": 0.75},
)
iv.wait_for_terminal_status()
print(iv.current_status)
```

#### Action.query()

```python
@classmethod
def query(
    spec: Optional[roboto.query.QuerySpecification] = None,
    accessibility: roboto.domain.actions.action_record.Accessibility = Accessibility.Organization,
    owner_org_id: Optional[str] = None,
    roboto_client: Optional[roboto.http.RobotoClient] = None,
) -> collections.abc.Generator[Action, None, None]
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/action.py#L237-L316)

List the actions in an organization, or in the Action Hub, that match a query specification.

Fetches one page of results at a time as the generator advances, and writes each page's token to `spec.after` to request the next.

**Parameters**

- **spec** (`Optional[roboto.query.QuerySpecification]`): Conditions, sort order, and page size of the query. Each condition's field must be an [`ActionRecord`](/docs/reference/python-sdk/roboto/domain/actions/action_record#roboto.domain.actions.action_record.ActionRecord) field, or a dotted path that starts with one, such as `metadata.software_version`. `None` lists every action.
- **accessibility** (`roboto.domain.actions.action_record.Accessibility`): [`Organization`](/docs/reference/python-sdk/roboto/domain/actions/action_record#roboto.domain.actions.action_record.Accessibility.Organization) lists an organization's actions; [`ActionHub`](/docs/reference/python-sdk/roboto/domain/actions/action_record#roboto.domain.actions.action_record.Accessibility.ActionHub) lists the actions in the Action Hub.
- **owner_org_id** (`Optional[str]`): Organization whose actions to list. Defaults to the organization the caller acts in. Ignored when `accessibility` is `ActionHub`.
- **roboto_client** (`Optional[roboto.http.RobotoClient]`): Client to make requests to Roboto with. Defaults to one configured from the environment, by [`from_env()`](/docs/reference/python-sdk/roboto/http/roboto_client#roboto.http.roboto_client.RobotoClient.from_env).

**Yields**

- Actions that match `spec`.

**Raises**

- `ValueError`: `spec` names a field that is not an action record field. It surfaces on the first iteration, before any request.

**Returns**

- `collections.abc.Generator[Action, None, None]`

**Usage**

List every action in the organization:

```python
for action in Action.query():
    print(action.name)
```

List the actions in the Action Hub whose names contain `ros`:

```python
from roboto.domain.actions import Accessibility
from roboto.query import Comparator, Condition, QuerySpecification
spec = QuerySpecification(
    condition=Condition(field="name", comparator=Comparator.Contains, value="ros")
)
for action in Action.query(spec, accessibility=Accessibility.ActionHub):
    print(action.name)
```

#### Action.set_accessibility()

```python
def set_accessibility(
    accessibility: roboto.domain.actions.action_record.Accessibility,
) -> Action
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/action.py#L614-L646)

Set who can find and invoke this action: members of its organization, or every Roboto user.

Accessibility applies to every version of the action. Only Roboto administrators can change it.

**Parameters**

- **accessibility** (`roboto.domain.actions.action_record.Accessibility`): [`ActionHub`](/docs/reference/python-sdk/roboto/domain/actions/action_record#roboto.domain.actions.action_record.Accessibility.ActionHub) publishes the action to the Action Hub; [`Organization`](/docs/reference/python-sdk/roboto/domain/actions/action_record#roboto.domain.actions.action_record.Accessibility.Organization) limits it to members of the organization that owns it.

**Returns**

- `Action`: This instance, with its record updated from Roboto's response, which holds the action's latest version.

**Usage**

Publish an action to the Action Hub:

```python
from roboto.domain.actions import Accessibility
action = Action.from_name("my_action")
action.set_accessibility(Accessibility.ActionHub)
```

Limit it to members of its organization again:

```python
action.set_accessibility(Accessibility.Organization)
```

#### Action.to_dict()

```python
def to_dict() -> dict[str, Any]
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/action.py#L648-L660)

Return this action's record as a dictionary of JSON-compatible values.

**Returns**

- `dict[str, Any]`: [`ActionRecord`](/docs/reference/python-sdk/roboto/domain/actions/action_record#roboto.domain.actions.action_record.ActionRecord) of the action, as a JSON-compatible dictionary.

**Usage**

```python
action = Action.from_name("my_action")
action_dict = action.to_dict()
print(action_dict["name"])
# my_action
```

#### Action.update()

```python
def update(
    compute_requirements: Optional[Union[roboto.domain.actions.action_record.ComputeRequirements, roboto.sentinels.NotSetType]] = NotSet,
    container_parameters: Optional[Union[roboto.domain.actions.action_record.ContainerParameters, roboto.sentinels.NotSetType]] = NotSet,
    description: Optional[Union[str, roboto.sentinels.NotSetType]] = NotSet,
    inherits: Optional[Union[roboto.domain.actions.action_record.ActionReference, roboto.sentinels.NotSetType]] = NotSet,
    metadata_changeset: Union[roboto.updates.MetadataChangeset, roboto.sentinels.NotSetType] = NotSet,
    parameter_changeset: Union[roboto.domain.actions.action_record.ActionParameterChangeset, roboto.sentinels.NotSetType] = NotSet,
    short_description: Optional[Union[str, roboto.sentinels.NotSetType]] = NotSet,
    timeout: Optional[Union[int, roboto.sentinels.NotSetType]] = NotSet,
    uri: Optional[Union[str, roboto.sentinels.NotSetType]] = NotSet,
    requires_downloaded_inputs: Union[bool, roboto.sentinels.NotSetType] = NotSet,
) -> Action
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/action.py#L662-L765)

Update this action's properties.

Each argument left unset (`NotSet`) leaves that property unchanged. A change to what the action runs (its image, container, compute, parameters, timeout, or input downloading) creates a new version of the action, with a new digest. A change to only its descriptions, tags, or metadata does not.

**Parameters**

- **compute_requirements** (`Optional[Union[roboto.domain.actions.action_record.ComputeRequirements, roboto.sentinels.NotSetType]]`): CPU, memory, and storage for each invocation of the action. `None` resets them to the defaults of [`ComputeRequirements`](/docs/reference/python-sdk/roboto/domain/actions/action_record#roboto.domain.actions.action_record.ComputeRequirements).
- **container_parameters** (`Optional[Union[roboto.domain.actions.action_record.ContainerParameters, roboto.sentinels.NotSetType]]`): Command, entry point, environment variables, and working directory for the action's container. `None` clears them.
- **description** (`Optional[Union[str, roboto.sentinels.NotSetType]]`): Human-readable description of the action. `None` or `""` clears it.
- **inherits** (`Optional[Union[roboto.domain.actions.action_record.ActionReference, roboto.sentinels.NotSetType]]`): Deprecated. Roboto rejects a request that sets it to an action reference; set the configuration on the action itself.
- **metadata_changeset** (`Union[roboto.updates.MetadataChangeset, roboto.sentinels.NotSetType]`): Changes to the action's tags and metadata.
- **parameter_changeset** (`Union[roboto.domain.actions.action_record.ActionParameterChangeset, roboto.sentinels.NotSetType]`): Parameters to add, replace, or remove, matched by name.
- **short_description** (`Optional[Union[str, roboto.sentinels.NotSetType]]`): Brief human-readable description of the action, at most 140 characters (`SHORT_DESCRIPTION_LENGTH`). `None` or `""` clears it.
- **timeout** (`Optional[Union[int, roboto.sentinels.NotSetType]]`): Maximum time, in minutes, an invocation of the action may run before Roboto stops it. `None` clears it, so invocations use Roboto's default.
- **uri** (`Optional[Union[str, roboto.sentinels.NotSetType]]`): URI of the container image the action runs, with surrounding whitespace stripped. `None` clears it.
- **requires_downloaded_inputs** (`Union[bool, roboto.sentinels.NotSetType]`): Whether Roboto downloads an invocation's input files into the action's container before it runs.

**Returns**

- `Action`: This instance, with its record updated from Roboto's response.

**Raises**

- [`RobotoIllegalArgumentException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoIllegalArgumentException): `short_description` is longer than 140 characters. Raised before any request.
- [`RobotoInvalidRequestException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoInvalidRequestException): `inherits` is set to an action reference, two added parameters share a name, or an added required parameter has a default.
- [`RobotoLimitExceededException`](/docs/reference/python-sdk/roboto/exceptions/domain#roboto.exceptions.domain.RobotoLimitExceededException): `compute_requirements` or `timeout` is above the organization's limits.

**Usage**

Update the description and timeout:

```python
action = Action.from_name("my_action")
action.update(description="Updated description of what this action does", timeout=45)
```

Update the compute requirements:

```python
from roboto.domain.actions import ComputeRequirements
action.update(compute_requirements=ComputeRequirements(vCPU=4096, memory=8192))
```

Set two metadata fields and add a tag:

```python
from roboto.updates import MetadataChangeset
changeset = (
    MetadataChangeset.Builder()
    .put_field("version", "2.0")
    .put_field("team", "ml")
    .put_tag("ml")
    .build()
)
action.update(metadata_changeset=changeset)
```

### SHORT_DESCRIPTION_LENGTH

```python
roboto.domain.actions.action.SHORT_DESCRIPTION_LENGTH = 140
```

`from roboto.domain.actions.action import SHORT_DESCRIPTION_LENGTH`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/action.py#L50-L50)

Maximum length of an action's short description, in characters.
