---
sidebar:
  hidden: true
title: roboto.domain.secrets.record
---
## Module Contents

### AwsSecretRetrievalLocation

```python
class roboto.domain.secrets.record.AwsSecretRetrievalLocation(/, **data: Any)
```

`from roboto.domain.secrets import AwsSecretRetrievalLocation`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/secrets/record.py#L49-L60)

Bases: `pydantic.BaseModel`

Location of a secret's value in AWS Secrets Manager.

Carried in `SecretRecord.location`. Building one with any other `store_type` raises `pydantic.ValidationError`.

**Parameters**

- **data** (`Any`)

**Attributes**

- **AwsSecretRetrievalLocation.arn** (`str`): Amazon Resource Name (ARN) of the secret in AWS Secrets Manager.
- **AwsSecretRetrievalLocation.store_type** (`Literal[SecretStoreType]`): Kind of secret store, always `SecretStoreType.AWS`.

### AwsSecretsManagerAccessCreds

```python
class roboto.domain.secrets.record.AwsSecretsManagerAccessCreds(/, **data: Any)
```

`from roboto.domain.secrets import AwsSecretsManagerAccessCreds`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/secrets/record.py#L22-L42)

Bases: `pydantic.BaseModel`

Short-lived AWS credentials that reach one secret's value in AWS Secrets Manager.

Carried in `GetSecretAccessCredsResponse.creds`. Building one with any other `store_type` raises `pydantic.ValidationError`.

**Parameters**

- **data** (`Any`)

**Attributes**

- **AwsSecretsManagerAccessCreds.access_key_id** (`str`): AWS access key ID of the credentials.
- **AwsSecretsManagerAccessCreds.region** (`str`): AWS region the secret is stored in.
- **AwsSecretsManagerAccessCreds.secret_access_key** (`str`): AWS secret access key of the credentials.
- **AwsSecretsManagerAccessCreds.session_token** (`str`): AWS session token of the credentials.
- **AwsSecretsManagerAccessCreds.store_type** (`Literal[SecretStoreType]`): Kind of secret store, always `SecretStoreType.AWS`.

### CreateSecretRequest

```python
class roboto.domain.secrets.record.CreateSecretRequest(/, **data: Any)
```

`from roboto.domain.secrets import CreateSecretRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/secrets/record.py#L108-L112)

Bases: `pydantic.BaseModel`

Request body for [`create()`](/docs/reference/python-sdk/roboto/domain/secrets/secret#roboto.domain.secrets.secret.Secret.create).

**Parameters**

- **data** (`Any`)

**Attributes**

- **CreateSecretRequest.name** (`str`): Name of the secret, unique within the organization it is created in.

### GetSecretAccessCredsResponse

```python
class roboto.domain.secrets.record.GetSecretAccessCredsResponse(/, **data: Any)
```

`from roboto.domain.secrets import GetSecretAccessCredsResponse`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/secrets/record.py#L115-L131)

Bases: `pydantic.BaseModel`

Response body of [`read_value()`](/docs/reference/python-sdk/roboto/domain/secrets/secret#roboto.domain.secrets.secret.Secret.read_value).

[`update_value()`](/docs/reference/python-sdk/roboto/domain/secrets/secret#roboto.domain.secrets.secret.Secret.update_value) reads it too. Both send `GET /v1/secrets/name/{secret_name}/creds`, then use `creds` to reach the secret store directly, so the value never passes through Roboto.

**Parameters**

- **data** (`Any`)

**Attributes**

- **GetSecretAccessCredsResponse.creds** (`SecretAccessCreds`) = `None`: Short-lived credentials scoped to this one secret.

  They can always read its value, and can also overwrite it only when the caller has permission to update the secret.

- **GetSecretAccessCredsResponse.record** (`SecretRecord`): Record of the secret.

### SecretAccessCreds

```python
roboto.domain.secrets.record.SecretAccessCreds
```

`from roboto.domain.secrets import SecretAccessCreds`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/secrets/record.py#L45-L45)

Secret access credentials of any kind: one of `AwsSecretsManagerAccessCreds`.

### SecretRecord

```python
class roboto.domain.secrets.record.SecretRecord(/, **data: Any)
```

`from roboto.domain.secrets import SecretRecord`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/secrets/record.py#L67-L105)

Bases: `pydantic.BaseModel`

Data record of a secret, as the Roboto API returns it.

A secret is sensitive information, such as an API key or password, that actions can use while they run. Its value is kept in a secret store and never passes through Roboto's APIs, so the record holds only where to find it. [`Secret`](/docs/reference/python-sdk/roboto/domain/secrets/secret#roboto.domain.secrets.secret.Secret) wraps this record with methods that act on the secret, and exposes it as [`record`](/docs/reference/python-sdk/roboto/domain/secrets/secret#roboto.domain.secrets.secret.Secret.record).

**Parameters**

- **data** (`Any`)

**Attributes**

- **SecretRecord.created** (`datetime.datetime`): Time the secret was created.

- **SecretRecord.created_by** (`str`): Principal that created the secret, as `<type>:<id>`, such as `user:<user_id>`.

- **SecretRecord.last_used** (`datetime.datetime | None`) = `None`: Time an action last used the secret, or `None` if none has.

- **SecretRecord.location** (`SecretRetrievalLocation`) = `None`: Location of the secret's value in its secret store.

  Reading or updating the value takes this location together with the short-lived credentials in `GetSecretAccessCredsResponse`.

- **SecretRecord.modified** (`datetime.datetime`): Time the secret was last modified.

- **SecretRecord.modified_by** (`str`): Principal that last modified the secret, in the same `<type>:<id>` form as `created_by`.

- **SecretRecord.name** (`str`): Name of the secret, unique within its organization.

- **SecretRecord.org_id** (`str`): ID of the organization that owns the secret.

- **SecretRecord.store_type** (`SecretStoreType`): Type of secret store that holds the secret's value.

### SecretRetrievalLocation

```python
roboto.domain.secrets.record.SecretRetrievalLocation
```

`from roboto.domain.secrets.record import SecretRetrievalLocation`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/secrets/record.py#L63-L63)

Secret value location of any kind: one of `AwsSecretRetrievalLocation`.

### SecretStoreType

```python
class roboto.domain.secrets.record.SecretStoreType
```

`from roboto.domain.secrets import SecretStoreType`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/secrets/record.py#L15-L19)

Bases: `roboto.compat.StrEnum`

Kind of secret store that holds a secret's value.

**Attributes**

- **SecretStoreType.AWS** = `'aws'`: AWS Secrets Manager.
