Content Acceleration,Dynamic Web Acceleration,Media Acceleration VoD,Media Acceleration Live Broadcast
Self-modify advanced source configurations through interfaces.Allows customers to specify regional configurations, different IP backsources, and when multiple sources are available, policy backsources can be specified.
Single user trigger frequency: 300/5min
| Error code(code) | Description(message) | HTTP status | Semantic |
|---|---|---|---|
| InvalidParameter | The value of use-advanced-sources must be true or false. | 400 | The value of use-advanced-sources must be true or false. |
| InvalidParameter | The strategy is invalid. | 400 | The strategy is invalid. |
| InvalidParameter | The area is invalid. | 400 | The area is invalid. |
| NoSuchOperator | The specified operator does not exist. | 404 | The specified operator does not exist. |
| NoSuchCustomer | The specified customer name does not exist. | 404 | The specified customer name does not exist. |
| NoSuchCustomer | The specified customer id does not exist. | 404 | The specified customer id does not exist. |
| NoSuchRequestID | The specified request id does not exist. | 404 | The specified request id does not exist. |
| DuplicatedRequestID | The specified request id already exist. | 400 | The specified request id already exist. |
| NoSpecifiedDomain | You must specified domain. | 400 | You must specified domain. |
| NoSuchDomain | The specified domain does not exist. | 404 | The specified domain does not exist. |
| DomainNotRestored | The domain you are trying to cancel has not been restored. | 409 | The domain you are trying to cancel has not been restored. |
| InternalError | We encountered an internal error. Please try again. | 500 | We encountered an internal error. Please try again. |
| DuplicatedDomainName | The specified domain name must be unique. | 400 | The specified domain name must be unique. |
| InvalidParameter | Domain attribute Origin ip config err. | 400 | Domain attribute Origin ip config err. |
| InvalidParameter | Domain attribute Origin ip config err. | 400 | Domain attribute Origin ip config err. |
| InvalidParameter | Domain attribute Origin ip config err. | 400 | Domain attribute Origin ip config err. |
| ConfigError | The config advSrc does not access. | 400 | The config advSrc does not access. |
| InvalidParameter | Domain attribute Origin ip config err. | 403 | Domain attribute Origin ip config err. |
| ConfigVersionOutOfDate | The specified version is out of date. | 409 | The specified version is out of date. |
| Forbidden | The domain is being deleted | 403 | The domain is being deleted |
| InvalidParameter | The specified use-advanced-sources is invalid. | 400 | The specified use-advanced-sources is invalid. |
| InvalidParameter | The specified use-dynamic-sources is invalid. | 400 | The specified use-dynamic-sources is invalid. |
| Forbidden | Disallow to change adv advanced-sources before authorization. | 403 | Disallow to change adv advanced-sources before authorization. |
| InvalidParameter | The specified advanced-sources is empty. | 400 | The specified advanced-sources is empty. |
| InternalError | We encountered an internal error. Please try again. | 500 | We encountered an internal error. Please try again. |
| InvalidParameter | The specified areas is empty | 400 | The specified areas is empty |
| DuplicatedArea | The specified area must be unique. | 400 | The specified area must be unique. |
| InvalidParameter | The specified strategy is invalid. | 400 | The specified strategy is invalid. |
| InvalidParameter | The specified config adv-ips must not empty . | 400 | The specified config adv-ips must not empty . |
| InvalidParameter | The specified ip is empty. | 400 | The specified ip is empty. |
| InvalidParameter | The specified ip is invalid. | 400 | The specified ip is invalid. |
| DuplicatedIp | The specified ip already exist in advanced-source config. | 400 | The specified ip already exist in advanced-source config. |
| InvalidParameter | The priority must in [1,5]. | 400 | The priority must in [1,5]. |
| InvalidParameter | The weight must in [1,99999]. | 400 | The weight must in [1,99999]. |
| RequiredPriorityValueOne | Must contain a priority config value is 1. | 400 | Must contain a priority config value is 1. |
| InvalidParameter | The area is invalid. | 400 | The area is invalid. |
| RequiredGlobalArea | Must contain a area config value is Global. | 400 | Must contain a area config value is Global. |
| InternalError | We encountered an internal error. Please try again. | 500 | We encountered an internal error. Please try again. |
| InvalidParameter | source-host error, ipv4, ipv6 and domain name are supported, and you can specify one. | 400 | source-host error, ipv4, ipv6 and domain name are supported, and you can specify one. |
| InvalidParameter | authorizationMethod parameter error | 400 | authorizationMethod parameter error |
| InvalidParameter | default-source-host error, ipv4, ipv6 and domain name are supported, and you can specify one. | 400 | default-source-host error, ipv4, ipv6 and domain name are supported, and you can specify one. |
#!/bin/bash
username="example_username"
apiKey="example_apiKey"
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url "https://{@apiDomain}/api/basicconfig/advancedsource/123344" \
-X "PUT" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-H "Content-Type:application/json" \
-d '
{
"origin-ip":"127.0.1.1;127.0.2.1;127.0.4.1;127.0.5.1",
"default-source-host":"1.1.1.1",
"src-port":"80",
"use-advanced-sources":"true",
"use-dynamic-sources":"true",
"advanced-sources":[
{
"advanced-source-strategies":[
"primary",
"standby"
],
"areas":[
"Global",
"Japan"
],
"adv-ips":[
{
"ip":"127.0.1.1",
"priority":"1",
"weight":"10"
},
{
"ip":"127.0.2.1",
"priority":"2",
"weight":"9"
}
]
},
{
"advanced-source-strategies":[
"standby"
],
"areas":[
"China"
],
"adv-ips":[
{
"ip":"127.0.4.1",
"priority":"1",
"weight":"10"
},
{
"ip":"127.0.5.1",
"priority":"2",
"weight":"9"
}
]
}
]
}'HTTP/1.1 202 Accepted
Server: openresty/1.11.2.2
Date: Fri, 24 May 2019 06:08:47 GMT
Content-Type: application/json;charset=utf-8
Content-Length: 31
Connection: keep-alive
App-Name: service_confApi
x-cnc-request-id: 01f0d3ac-d326-44d3
{"message":"success","code":""}