节流限制:您每秒最多可以提交 20 个 API 请求。
参数名称 | 数据类型 | 是否必选 | 参数说明 |
|---|---|---|---|
Action | String | 是 | 接口名称。当前 API 的名称为 UpdateCdnConfig。 |
Version | String | 是 | 接口版本。当前 API 的版本为 2021-03-01。 |
参数名称 | 数据类型 | 是否必选 | 参数说明 | 示例 |
|---|---|---|---|---|
Domain | String | 是 | 表示要修改配置的加速域名。 | www.example.com |
参数名称 | 数据类型 | 是否必选 | 参数说明 | 示例 |
|---|---|---|---|---|
IPv6 | Object | 否 | 表示 IPv6 配置。 |
POST https://cdn.volcengineapi.com/?Version=2021-03-01&Action=UpdateCdnConfig { "Domain": "www.example.com", "IPv6": { "Switch": false } }
参数名称 | 数据类型 | 是否必选 | 参数说明 | 示例 |
|---|---|---|---|---|
Origin | Object[] | 否 | 表示源站配置。 |
POST https://cdn.volcengineapi.com/?Version=2021-03-01&Action=UpdateCdnConfig { "Domain": "www.example.com", "Origin": [ { "OriginAction": { "OriginLines": [ { "Address": "xxx.xx.xx.xxx", "HttpPort": "80", "HttpsPort": "443", "InstanceType": "ip", "OriginType": "primary", "Weight": "10" }, { "Address": "xx.xx.xx.xx", "HttpPort": "80", "HttpsPort": "443", "InstanceType": "ip", "OriginType": "primary", "Weight": "10" } ] } } ] }
POST https://cdn.volcengineapi.com/?Version=2021-03-01&Action=UpdateCdnConfig { "Domain": "www.example.com", "Origin": [ { "OriginAction": { "OriginLines": [ { "Address": "bucketname.cos.region.myqcloud.com", "InstanceType": "tos", "OriginType": "primary", "PrivateBucketAccess": true, "PrivateBucketAuth": { "Switch": true, "AuthType": "cos", "TosAuthInformation": { "AccessKeyId": "xxxxxxxxxxxxxxxx", "AccessKeySecret": "xxxxxxx" } } } ] } } ] }
POST https://cdn.volcengineapi.com/?Version=2021-03-01&Action=UpdateCdnConfig { "Domain": "www.example.com", "Origin": [ { "OriginAction": { "OriginLines": [ { "Address": "mybucket.tos-cn-beijing.volces.com", "InstanceType": "tos", "OriginType": "primary", "PrivateBucketAccess": true, "PrivateBucketAuth": { "Switch": true, "AuthType": "tos" }, "Weight": "1" } ] } } ] }
POST https://cdn.volcengineapi.com/?Version=2021-03-01&Action=UpdateCdnConfig { "Domain": "www.example.com", "Origin": [ { "OriginAction": { "OriginLines": [ { "Address": "mybucket.tos-cn-beijing.volces.com" "InstanceType": "tos", "OriginType": "primary", "PrivateBucketAccess": true, "PrivateBucketAuth": { "Switch": true "AuthType": "tos", "TosAuthInformation": { "AccessKeyId": "xxxxxxxxxxxxx", "AccessKeySecret": "xxxxxxxxxxxxxxxxxx" } }, "Weight": "1", } ] } } ] }
参数名称 | 数据类型 | 是否必选 | 参数说明 | 示例 |
|---|---|---|---|---|
ConditionalOrigin | Object | 否 | 表示 "条件源站" 特性的配置。要使用此特性,请 提交工单。 |
POST https: //cdn.byteplusapi.com/?Version=2021-03-01&Action=UpdateCdnConfig { "Domain": "www.example.com", "ConditionalOrigin": { "Switch": true, "OriginRules": [ { "Actions": { "OriginLines": [ { "OriginType": "primary", "Address": "203.0.113.8", "HttpPort": "80", "HttpsPort": "443", "OriginHost": "www.example.com", "Weight": "1", "InstanceType": "ip" }, { "OriginType": "primary", "Address": "test.example.com", "HttpPort": "80", "HttpsPort": "443", "Weight": "2", "PrivateBucketAccess": false, "InstanceType": "domain" }, { "OriginType": "primary", "Address": "mybucket.tos-cn-beijing.volces.com", "TosAuthInformation": { "AccessKeyId": "xxxxxxxxx", "AccessKeySecret": "xxxxxxx" }, "Weight": "1", "PrivateBucketAccess": true, "InstanceType": "storage", "BucketSource": "tos" }, { "OriginType": "backup", "Address": "my-global-data.s3.us-east-1.amazonaws.com", "HttpPort": "80", "HttpsPort": "443", "TosAuthInformation": { "AccessKeyId": "xxxxxxxxxxxxx", "AccessKeySecret": "xxxxxxxxxxxx", "Region": "us-east-1" }, "Weight": "1", "PrivateBucketAccess": true, "InstanceType": "storage", "BucketSource": "aws_common" }, { "OriginType": "backup", "Address": "cdn-aquarium-photos.oss-cn-shanghai.aliyuncs.com", "HttpPort": "80", "HttpsPort": "443", "TosAuthInformation": { "AccessKeyId": "xxxxxxxxxxxxxxx", "AccessKeySecret": "xxxxxxxxxxxxxxx" }, "Weight": "1", "PrivateBucketAccess": true, "InstanceType": "storage", "BucketSource": "oss" }, { "OriginType": "backup", "Address": "cdn-aquarium-photos.cos.ap-shanghai.myqcloud.com", "HttpPort": "80", "HttpsPort": "443", "TosAuthInformation": {}, "Weight": "1", "PrivateBucketAccess": false, "InstanceType": "storage", "BucketSource": "cos" }, { "OriginType": "backup", "Address": "my-bucket.tos-cn-beijing.volces.com", "HttpPort": "80", "HttpsPort": "443", "TosAuthInformation": {}, "Weight": "1", "PrivateBucketAccess": true, "InstanceType": "storage", "BucketSource": "tos" } ] }, "Condition": { "IsGroup": true, "Connective": "and", "ConditionGroups": [ { "IsGroup": false, "Condition": { "Object": "path", "Operator": "equal", "Value": [ "/a/b/c", "/d/e/f" ] } }, { "IsGroup": false, "Condition": { "Object": "client_ip_operator", "Operator": "belong", "Value": [ "CM", "CU", "CT", "CMTIETONG", "CBN", "CERNET", "DRPENG" ] } }, { "IsGroup": false, "Condition": { "Object": "full_querystring", "Operator": "regex_match", "Value": [ "^a{1,2}b(.*)g=val[1-3]" ] } }, { "IsGroup": false, "Condition": { "Object": "directory", "Operator": "equal", "Value": [ "/dir1/dir2/", "/dir1/dir3/" ] } }, { "IsGroup": false, "Condition": { "Object": "filetype", "Operator": "not_equal", "Value": [ "bmp", "txt" ] } }, { "IsGroup": false, "Condition": { "Object": "client_ip", "Operator": "equal", "Value": [ "198.51.100.25", "198.51.100.28" ] } }, { "IsGroup": false, "Condition": { "Object": "client_ip", "Operator": "belong", "Value": [ "HKG", "MAC" ] } }, { "IsGroup": false, "Condition": { "Name": "param1", "Object": "query_name", "Operator": "equal", "Value": [ "param-value1", "param-value2" ], "Type": "querystring" } }, { "IsGroup": false, "Condition": { "Name": "param3", "Object": "query_name", "Operator": "not_exist", "Value": [], "Type": "querystring" } }, { "IsGroup": false, "Condition": { "Name": "param4", "Object": "query_name", "Operator": "not_empty", "Value": [], "Type": "querystring" } }, { "IsGroup": false, "Condition": { "Name": "header1", "Object": "customize", "Operator": "match", "Value": [ "header-value1;header-value2" ], "Type": "request_header" } } ] } } ] } }
参数名称 | 数据类型 | 是否必选 | 参数说明 | 示例 |
|---|---|---|---|---|
OriginProtocol | String | 是 | 表示回源请求使用的协议。该参数有以下取值:
| http |
POST https://cdn.volcengineapi.com/?Version=2021-03-01&Action=UpdateCdnConfig { "Domain": "www.example.com", "OriginProtocol": "http" }
参数名称 | 数据类型 | 是否必选 | 参数说明 | 示例 |
|---|---|---|---|---|
OriginCertCheck | Object | 否 | 表示 "源站证书校验" 特性的配置。要使用此特性,请 提交工单。 该特性启用后,CDN 会校验源站证书的合法性,包括证书是否已被吊销、证书是否由可信 CA 签发、证书与源站域名是否匹配等。CDN 内置了常见可信 CA 的根证书。 该特性还支持双向认证,使源站对 CDN 身份进行校验。您需要在 CDN 中指定相应的客户端证书。 |
POST https://cdn.volcengineapi.com/?Version=2021-03-01&Action=UpdateCdnConfig { "Domain": "www.example.com", "OriginCertCheck": { "CertInfoList": [ { "CertId": "cert_hosting-86594" } ], "ClientCertInfoList": [ { "CertId": "cert_hosting-86040" } ], "Switch": true, "Type": "mutual" } }
参数名称 | 数据类型 | 是否必选 | 参数说明 | 示例 |
|---|---|---|---|---|
OriginIPv6 | String | 否 | 表示 "IPv6 回源" 的配置。该参数有以下取值:
该参数的默认值是 | followclient |
POST https://cdn.volcengineapi.com/?Version=2021-03-01&Action=UpdateCdnConfig { "Domain": "www.example.com", "OriginIPv6": "ipv6_first" }
参数名称 | 数据类型 | 是否必选 | 参数说明 | 示例 |
|---|---|---|---|---|
OriginHost | String | 否 | 如果源站服务器上有多个站点,该参数表示回源请求访问的站点域名。该参数对所有源站配置生效,但是优先级低于源站配置中 该参数的默认值与 Address 相同。 | img.example.com |
POST https://cdn.volcengineapi.com/?Version=2021-03-01&Action=UpdateCdnConfig { "Domain": "www.example.com", "OriginHost": "img.example.com" }
参数名称 | 数据类型 | 是否必选 | 参数说明 | 示例 |
|---|---|---|---|---|
ServiceRegion | String | 否 | 表示该加速域名的加速区域。该参数有以下取值:
chinese_mainland。要指定另两个值,请 提交工单。 | chinese_mainland |
POST https://cdn.volcengineapi.com/?Version=2021-03-01&Action=UpdateCdnConfig { "Domain": "www.example.com", "ServiceRegion": "chinese_mainland" }
由于该 API 没有响应参数,响应正文只有包含请求元数据的 ResponseMetadata 结构体,没有 Result 结构体。
{ "ResponseMetadata": { "RequestId": "2022010415564801021219713102003D3F", "Action": "UpdateCdnConfig", "Version": "2021-03-01", "Service": "CDN", "Region": "cn-north-1" } }
如果响应正文的 ResponseMetadata 字段中包含 Error 字段,则表示 API 请求失败。更多关于错误码的信息,参见错误码。