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

### CreateActionRequest

```python
class roboto.domain.actions.action_operations.CreateActionRequest(/, **data: Any)
```

`from roboto import CreateActionRequest`

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

Bases: `pydantic.BaseModel`

Request body for [`create()`](/docs/reference/python-sdk/roboto/domain/actions/action#roboto.domain.actions.action.Action.create).

**Parameters**

- **data** (`Any`)

**Attributes**

- **CreateActionRequest.compute_requirements** (`roboto.domain.actions.action_record.ComputeRequirements | None`) = `None`: CPU, memory, and storage for the action's container.

  `None` uses the defaults of [`ComputeRequirements`](/docs/reference/python-sdk/roboto/domain/actions/action_record#roboto.domain.actions.action_record.ComputeRequirements).

- **CreateActionRequest.container_parameters** (`roboto.domain.actions.action_record.ContainerParameters | None`) = `None`: Command, entry point, environment variables, and working directory for the action's container.

  `None` sets none of them.

- **CreateActionRequest.description** (`str | None`) = `None`: Human-readable description of the action.

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

  Set the configuration on the action itself instead. A request that sets this field fails with `RobotoInvalidRequestException`.

- **CreateActionRequest.metadata** (`dict[str, Any]`) = `None`: Key-value metadata to set on the action.

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

  Letters, digits, underscores, and dashes only.

- **CreateActionRequest.parameters** (`list[roboto.domain.actions.action_record.ActionParameter]`) = `None`: Parameters a caller can set when invoking the action. Defaults to none.

  Names must be unique, and a required parameter cannot have a default. Otherwise the request fails with `RobotoInvalidRequestException`.

- **CreateActionRequest.requires_downloaded_inputs** (`bool | None`) = `None`: Whether an invocation's input files are downloaded into the action's container before it runs.

  `None` means `True`.

- **CreateActionRequest.short_description** (`str | None`) = `None`: Brief human-readable description of the action.

  [`create()`](/docs/reference/python-sdk/roboto/domain/actions/action#roboto.domain.actions.action.Action.create) rejects one longer than 140 characters ([`SHORT_DESCRIPTION_LENGTH`](/docs/reference/python-sdk/roboto/domain/actions/action#roboto.domain.actions.action.SHORT_DESCRIPTION_LENGTH)).

- **CreateActionRequest.tags** (`list[str]`) = `None`: Tags to set on the action. Defaults to none.

- **CreateActionRequest.timeout** (`int | None`) = `None`: Maximum time, in minutes, an invocation of the action may run before Roboto stops it.

  `None` uses Roboto's default. A value above the organization's limit fails the request with `RobotoLimitExceededException`.

- **CreateActionRequest.uri** (`str | None`) = `None`: URI of the container image the action runs, such as `"ubuntu:latest"`.

### SetActionAccessibilityRequest

```python
class roboto.domain.actions.action_operations.SetActionAccessibilityRequest(
    /,
    **data: Any,
)
```

`from roboto import SetActionAccessibilityRequest`

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

Bases: `pydantic.BaseModel`

Request body for [`set_accessibility()`](/docs/reference/python-sdk/roboto/domain/actions/action#roboto.domain.actions.action.Action.set_accessibility).

Only Roboto administrators may send it.

A `digest` that matches no version of the action raises `RobotoNotFoundException`.

**Parameters**

- **data** (`Any`)

**Attributes**

- **SetActionAccessibilityRequest.accessibility** (`roboto.domain.actions.action_record.Accessibility`): Who can find and invoke the action: members of its organization, or every Roboto user through the Action Hub.

- **SetActionAccessibilityRequest.digest** (`str | None`) = `None`: Digest of the version of the action to return in the response. `None` returns the latest version.

  Accessibility applies to every version of the action, whatever the digest.

- **SetActionAccessibilityRequest.model_config**: Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

### UpdateActionRequest

```python
class roboto.domain.actions.action_operations.UpdateActionRequest(/, **data: Any)
```

`from roboto import UpdateActionRequest`

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

Bases: `pydantic.BaseModel`

Request body for [`update()`](/docs/reference/python-sdk/roboto/domain/actions/action#roboto.domain.actions.action.Action.update).

Each field left unset (`NotSet`) leaves that property of the action 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.

Building the request raises `pydantic.ValidationError` when `uri` is empty after surrounding whitespace is stripped.

**Parameters**

- **data** (`Any`)

**Attributes**

- **UpdateActionRequest.compute_requirements** (`roboto.domain.actions.action_record.ComputeRequirements | roboto.sentinels.NotSetType | None`): CPU, memory, and storage for the action's container.

  `None` resets them to the defaults of [`ComputeRequirements`](/docs/reference/python-sdk/roboto/domain/actions/action_record#roboto.domain.actions.action_record.ComputeRequirements). A value above the organization's limits fails the request with `RobotoLimitExceededException`.

- **UpdateActionRequest.container_parameters** (`roboto.domain.actions.action_record.ContainerParameters | roboto.sentinels.NotSetType | None`): Command, entry point, environment variables, and working directory for the action's container.

  `None` clears them.

- **UpdateActionRequest.description** (`str | roboto.sentinels.NotSetType | None`): Human-readable description of the action. `None` or `""` clears it.

- **UpdateActionRequest.inherits** (`roboto.domain.actions.action_record.ActionReference | roboto.sentinels.NotSetType | None`): Deprecated. Action this action would inherit its configuration from.

  Set the configuration on the action itself instead. A request that sets this field to an action reference fails with `RobotoInvalidRequestException`.

- **UpdateActionRequest.metadata_changeset** (`roboto.updates.MetadataChangeset | roboto.sentinels.NotSetType`): Changes to the action's tags and metadata.

- **UpdateActionRequest.model_config**: Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

- **UpdateActionRequest.parameter_changeset** (`roboto.domain.actions.action_record.ActionParameterChangeset | roboto.sentinels.NotSetType`): Parameters to add, replace, or remove, matched by name.

  The added parameters must have unique names, and a required parameter cannot have a default. Otherwise the request fails with `RobotoInvalidRequestException`.

- **UpdateActionRequest.requires_downloaded_inputs** (`bool | roboto.sentinels.NotSetType`): Whether an invocation's input files are downloaded into the action's container before it runs.

- **UpdateActionRequest.short_description** (`str | roboto.sentinels.NotSetType | None`): Brief human-readable description of the action. `None` or `""` clears it.

  [`update()`](/docs/reference/python-sdk/roboto/domain/actions/action#roboto.domain.actions.action.Action.update) rejects one longer than 140 characters ([`SHORT_DESCRIPTION_LENGTH`](/docs/reference/python-sdk/roboto/domain/actions/action#roboto.domain.actions.action.SHORT_DESCRIPTION_LENGTH)).

- **UpdateActionRequest.timeout** (`int | roboto.sentinels.NotSetType | None`): Maximum time, in minutes, an invocation of the action may run before Roboto stops it.

  `None` clears it, so invocations use Roboto's default. A value above the organization's limit fails the request with `RobotoLimitExceededException`.

- **UpdateActionRequest.uri** (`str | roboto.sentinels.NotSetType | None`): URI of the container image the action runs. `None` clears it.

  Surrounding whitespace is stripped, and a URI that is empty after stripping is rejected.

#### UpdateActionRequest.validate_uri()

```python
def validate_uri(v)
```

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

Reject a `uri` that is empty after surrounding whitespace is stripped, and return it stripped otherwise.
