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
| Name | Description |
|---|---|
ipString | Back to the source IP.Support IP or domain name;If IP supports both IPV4 and IPv6, only one value is allowed |
areaString | A set of area configurations, with multiple parameters if more than one. |
areasLong | "Area where advanced sources need to be set.See the attachment for details.The input value has no English value corresponding to the region.There must be a Global region configuration, Global input Global.If you have |
adv-ipString | A set of IP messages |
weightInteger | The weight.Specify the weight of this back source IP, without entering the default 10 |
adv-ipsString | Configure the back source IP information under a region, or multiple groups if a region has more than one IP |
priorityInteger | The hierarchy.Specify the level of this back source IP, without entering a default layer |
src-portInteger | origin port |
origin-ipString | Back to the source address, can be IP or domain name. |
source-hostString | souce host, support ip and domain name, you can only specify one source-host in a adv-ips rule. |
detection-portInteger | detection port, it is available when use-advanced-sources=true |
advanced-sourceLong | Advanced source configuration, representing a high-level source.Customers can configure multiple advanced source content. |
advanced-sourcesLong | Advanced source configuration tags |
default-source-hostString | Origin HOST. |
use-dynamic-sourcesString | Enable dynamic source, some configuration do not support dynamic source
true: open
false: do not open
Clear: Web acceleration and site-wide acceleration are enabled by default; other services are disabled by default |
authorization-methodString | authorization method, supports OSS,TOS,Amazon S3 |
use-advanced-sourcesString | This is required to enable advanced source configuration. |
advanced-source-strategyString | Advanced source extension configuration, you can specify a single access policy for multiple IP addresses under a single advanced source configuration, multiple policies can have multiple parameters.
port: Use the request port to return to the source
offline: Enable offline mode
primary: Primary source polling
standby: Standby source polling |
advanced-source-strategiesLong | Advanced source extension configuration, you can specify a single advanced source configuration under multiple IP, access policy.Supports multiple, |
| Name | Description |
|---|---|
x-cnc-request-idString | Uniquely labeled id for querying each requested task (for all interfaces) |
| Name | Description |
|---|---|
codeString | The error code, when HTTPStatus is not 202, indicates the type of error the current request is calling. |
messageString | Response information, when success is successful |
| 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":""}