## Update a relay `moq.relays.update(strrelay_id, RelayUpdateParams**kwargs) -> RelayUpdateResponse` **put** `/accounts/{account_id}/moq/relays/{relay_id}` Updates a relay's name and/or configuration. Partial updates: omitted fields are preserved. Config sub-objects replace as whole objects when present. ### Parameters - `account_id: str` Cloudflare account identifier. - `relay_id: str` - `config: Optional[Config]` - `upstreams: Optional[ConfigUpstreams]` Upstreams are external MOQT server publishers that a relay falls back to when it has no local publisher for a requested namespace/track. - `enabled: Optional[bool]` - `upstreams: Optional[Iterable[ConfigUpstreamsUpstream]]` Ordered list of upstream MOQT server publishers. Each entry is an object (not a bare string) so per-upstream configuration can be added in the future without another breaking change. - `url: Optional[str]` Upstream MOQT server publisher URL. - `name: Optional[str]` ### Returns - `class RelayUpdateResponse: …` Full relay details (no tokens). - `config: Config` - `upstreams: Optional[ConfigUpstreams]` Upstreams are external MOQT server publishers that a relay falls back to when it has no local publisher for a requested namespace/track. - `enabled: Optional[bool]` - `upstreams: Optional[List[ConfigUpstreamsUpstream]]` Ordered list of upstream MOQT server publishers. Each entry is an object (not a bare string) so per-upstream configuration can be added in the future without another breaking change. - `url: Optional[str]` Upstream MOQT server publisher URL. - `created: datetime` - `modified: datetime` - `name: str` - `uid: str` - `status: Optional[Literal["connected"]]` "connected" when active, omitted otherwise. - `"connected"` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) relay = client.moq.relays.update( relay_id="a1b2c3d4e5f67890a1b2c3d4e5f67890", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) print(relay.uid) ``` #### Response ```json { "errors": [ { "code": 0, "message": "message" } ], "messages": [ { "code": 0, "message": "message" } ], "success": true, "result": { "config": { "upstreams": { "enabled": true, "upstreams": [ { "url": "url" } ] } }, "created": "2019-12-27T18:11:19.117Z", "modified": "2019-12-27T18:11:19.117Z", "name": "Production Live Stream", "uid": "a1b2c3d4e5f67890a1b2c3d4e5f67890", "status": "connected" } } ```