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. The relay ID goes in
the URL path — PUT /accounts/{account_id}/moq/relays/{relay_id} —
not the request body; there is no collection-level update endpoint.
This is also the only way to set a relay’s config (config cannot be
set at create time). Partial updates: omitted fields are preserved;
config sub-objects replace as whole objects when present.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
Update a relay
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){
"errors": [
{
"code": 0,
"message": "message"
}
],
"messages": [
{
"code": 0,
"message": "message"
}
],
"success": true,
"result": {
"config": {
"upstreams": {
"enabled": true,
"upstreams": [
{
"url": "https://example.com"
}
]
}
},
"created": "2019-12-27T18:11:19.117Z",
"modified": "2019-12-27T18:11:19.117Z",
"name": "Production Live Stream",
"uid": "a1b2c3d4e5f67890a1b2c3d4e5f67890",
"status": "connected"
}
}Returns Examples
{
"errors": [
{
"code": 0,
"message": "message"
}
],
"messages": [
{
"code": 0,
"message": "message"
}
],
"success": true,
"result": {
"config": {
"upstreams": {
"enabled": true,
"upstreams": [
{
"url": "https://example.com"
}
]
}
},
"created": "2019-12-27T18:11:19.117Z",
"modified": "2019-12-27T18:11:19.117Z",
"name": "Production Live Stream",
"uid": "a1b2c3d4e5f67890a1b2c3d4e5f67890",
"status": "connected"
}
}