更新空间的默认域名(注意:一种域名类型只能有一个默认域名,如果一种域名类型已有指定的默认类型,需要先把该默认域名修改为非默认,然后再指定其它域名为默认域名)。
使用 POST 方式发起请求。
下表仅列出了接口特有的请求参数和部分公共参数。完整的公共参数列表,参考「公共参数」。
字段 | 位置 | 类型 | 必填 | 说明 | 值 |
---|---|---|---|---|---|
Action | Query | String | 是 | 公共参数,OpenAPI 接口名称 | UpdateSpaceDomain |
Version | Query | String | 是 | 公共参数,OpenAPI 接口版本 | 2021-01-01 |
SpaceID | Query | String | 是 | 空间 ID | 可通过调用 ListSpaces 接口获取 |
字段 | 类型 | 必填 | 说明 |
---|---|---|---|
SpaceDomain | String | 是 | 要修改的域名 |
Default | Boolean | 是 | 域名是否为默认域名:
|
通用返回参数,请参考 ResponseMetadata 结构体说明。
Result 字段包含空间内所有域名更新后的详细信息,参见 查看域名 接口的返回结果说明。
POST https://open.volcengineapi.com?Action=UpdateSpaceDomain &Version=2021-01-01 &SpaceID=a2d6ca94-334b-4f81-b89c-02d381xxxxxx &<公共请求参数> { "SpaceDomain": "domain-name.push.example.com", "Default": true }
{ "ResponseMetadata": { "RequestId": "202207271814070102120551962114CFC7", "Action": "UpdateSpaceDomain", "Version": "2021-01-01", "Service": "aiotvideo", "Region": "cn-north-1" }, "Result": { "6o25juj54exxxxxx.pull.xxxxxx.com": { "Domain": "6o25juj54exxxxxx.pull.xxxxxxx.com", "Type": "fcdn-pull", "Status": "enabled", "CNAME": "6o25juj54exxxxxx.pull.xxxxxx.com.c.xxxxxxx.com", "CNAMEStatus": "", "Default": true, "Https": { "Enable": false, "CertificateID": "" }, "CreatedAt": "2021-12-01T10:09:55+08:00", "UpdatedAt": "", "TimeFlag": false, "MainKey": "", "SpareKey": "", "ValidDuration": 0 }, "6o25juj54exxxxxx.push.xxxxxx.com": { "Domain": "6o25juj54exxxxxx.push.xxxxxxx.com", "Type": "rtmp-push", "Status": "enabled", "CNAME": "6o25juj54exxxxxx.push.xxxxxx.com.c.xxxxxxx.com", "CNAMEStatus": "", "Default": false, "Https": { "Enable": false, "CertificateID": "" }, "CreatedAt": "2021-12-01T10:09:55+08:00", "UpdatedAt": "", "TimeFlag": true, "MainKey": "z7jHTm6BVUMB5WijphpzB4vZ", "SpareKey": "z7jHTm6BVUMB5WijphpzB4vZ", "ValidDuration": 10080 }, "domain-name.push.example.com": { "Domain": "domain-name.push.example.com", "Type": "rtmp-push", "Status": "enabled", "CNAME": "domain-name.push.example.com.c.xxxxxx.com", "CNAMEStatus": "", "Default": true, "Https": { "Enable": false, "CertificateID": "" }, "CreatedAt": "2022-07-27T17:34:09+08:00", "UpdatedAt": "2022-07-27T17:34:09+08:00", "TimeFlag": false, "MainKey": "", "SpareKey": "", "ValidDuration": 0 } } }