# place.stream.server.upsertStorage

> Published by [did:web:stream.place](https://lexicon.garden/identity/did:web:stream.place)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:web:stream.place/place.stream.server.upsertStorage)
- [Documentation](https://lexicon.garden/lexicon/did:web:stream.place/place.stream.server.upsertStorage/docs)
- [Examples](https://lexicon.garden/lexicon/did:web:stream.place/place.stream.server.upsertStorage/examples)

## Definitions

### `place.stream.server.upsertStorage`

**Type**: `procedure`

Create or update S3 storage configuration for backups.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `url` | `string` | No | S3 storage URL in format: s3+https://ACCESS_KEY:SECRET_KEY@endpoint/bucket |
| `isActive` | `boolean` | No | Whether backup storage is currently active. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `storage` | `ref` → `place.stream.server.defs#storage` | Yes |  |

#### Errors

- **InvalidUrl**: The provided S3 URL is invalid or malformed.
- **ConnectionFailed**: Could not connect to the S3 endpoint with the provided credentials.
- **MaskedCredentialsModified**: Cannot modify URL while keeping masked credentials. Provide full credentials or omit URL to keep existing configuration.

## Raw Schema

```json
{
  "id": "place.stream.server.upsertStorage",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "S3 storage URL in format: s3+https://ACCESS_KEY:SECRET_KEY@endpoint/bucket"
            },
            "isActive": {
              "type": "boolean",
              "description": "Whether backup storage is currently active."
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "InvalidUrl",
          "description": "The provided S3 URL is invalid or malformed."
        },
        {
          "name": "ConnectionFailed",
          "description": "Could not connect to the S3 endpoint with the provided credentials."
        },
        {
          "name": "MaskedCredentialsModified",
          "description": "Cannot modify URL while keeping masked credentials. Provide full credentials or omit URL to keep existing configuration."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "storage"
          ],
          "properties": {
            "storage": {
              "ref": "place.stream.server.defs#storage",
              "type": "ref"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": null,
      "description": "Create or update S3 storage configuration for backups."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
