## Update a file

`files.update(strfile_id, FileUpdateParams**kwargs)  -> SGPFile`

**patch** `/v5/files/{file_id}`

Update a file's mutable metadata by id.

Only the file's `tags` can be modified; filename, content, size, and other
attributes are immutable through this endpoint. The supplied tags replace the
file's existing tags. Returns the updated file metadata.

### Parameters

- `file_id: str`

- `tags: Optional[Dict[str, object]]`

- `x_project_id: Optional[str]`

### Returns

- `class SGPFile: …`

  - `id: str`

    The unique identifier of the entity.

  - `created_at: datetime`

    The date and time when the entity was created in ISO format.

  - `created_by: Identity`

    The identity that created the entity.

    - `id: str`

    - `type: Literal["user", "service_account"]`

      - `"user"`

      - `"service_account"`

    - `object: Optional[Literal["identity"]]`

      - `"identity"`

  - `filename: str`

  - `md5_checksum: str`

  - `mime_type: str`

  - `size: int`

  - `duration_seconds: Optional[int]`

  - `object: Optional[Literal["file"]]`

    - `"file"`

  - `tags: Optional[Dict[str, object]]`

### Example

```python
import os
from scale_gp_beta import SGPClient

client = SGPClient(
    api_key=os.environ.get("SGP_API_KEY"),  # This is the default and can be omitted
)
sgp_file = client.files.update(
    file_id="file_id",
)
print(sgp_file.id)
```

#### Response

```json
{
  "id": "id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "created_by": {
    "id": "id",
    "type": "user",
    "object": "identity"
  },
  "filename": "filename",
  "md5_checksum": "md5_checksum",
  "mime_type": "mime_type",
  "size": 0,
  "duration_seconds": 0,
  "object": "file",
  "tags": {
    "foo": "bar"
  }
}
```
