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 |
|---|---|---|---|
| ConfigError | Please set use-advanced-sources as true when you want to config detectionPort. | 400 | Please set use-advanced-sources as true when you want to config detectionPort. |
| ConfigError | The config advSrc does not access. | 400 | The config advSrc does not access. |
| InvalidParameter | The specified advanced-source-strategy is invalid. | 400 | The specified advanced-source-strategy is invalid. |
| InvalidParameter | The specified area is invalid. | 400 | The specified area is invalid. |
| InvalidParameter | The specified path-pattern should be set in all adv-ip when one path-pattern is set. | 400 | The specified path-pattern should be set in all adv-ip when one path-pattern is set. |
| ConfigError | Please set use-dynamic-sources as false when you want to config path-pattern. | 400 | Please set use-dynamic-sources as false when you want to config path-pattern. |
#!/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/predeploy/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":"false",
"advanced-sources":[
{
"advanced-source-strategies":[
"primary",
"standby"
],
"areas":[
"Global",
"Japan"
],
"adv-ips":[
{
"ip":"127.0.1.1",
"priority":"1",
"weight":"10",
"source-host": "sourcehost1.example.com"
},
{
"ip":"127.0.2.1",
"priority":"2",
"weight":"9",
"source-host": "sourcehost2.example.com"
}
]
},
{
"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 OK
Server: openresty/1.11.2.2
Date: Thu, 14 Mar 2019 08:09:45 GMT
Content-Type: application/json;charset=utf-8
Content-Length: 31
Connection: keep-alive
App-Name: service_confApi
x-cnc-request-id: 86f908a5-3e45-4be3
{"preDeployId":"66201667e7424820b9e359671178757c"}