Media Acceleration VoD,Media Acceleration Live Broadcast,Content Acceleration,Dynamic Web Acceleration
Modify domain name properties, such as back source IP, back source host, and back source port.
Single user trigger frequency: 300/5min
| Name | Description |
|---|---|
*domain-nameString | the domain whoes need query config |
| Name | Description |
|---|---|
*origin-configObject | Origin config. |
origin-hostString | Back to source host, not required |
origin-ipsString | Source IP or domain name.
1. Support IPV4,IPV6.
2. Multiple IPs are separated by semicolons, such as:1.1.1.1;2.2.2.2.
3. Support single domain name. |
origin-portString | Origin port. Port range:(0-65535]. |
descriptionString | description |
| Name | Description |
|---|---|
codeString | The error code, which appears when HTTPStatus is not 202, indicates the error type of the current request invocation |
messageString | Response information, when success is successful |
| Error code(code) | Description(message) | HTTP status | Semantic |
|---|---|---|---|
| InvalidParameter | No origin-config was specified. | 400 | No origin-config was specified. |
| InvalidParameter | The origin-ips's value separated by semicolon can appear only once. | 400 | The origin-ips's value separated by semicolon can appear only once. |
| InvalidParameter | The specified origin-ips is invalid. | 400 | The specified origin-ips is invalid. |
| InvalidParameter | The specified origin-ips could not be blank. | 400 | The specified origin-ips could not be blank. |
| InvalidParameter | The specified origin-host is invalid. | 400 | The specified origin-host is invalid. |
| InvalidParameter | The specified origin-port must be greater than 0 and less than 65536. | 400 | The specified origin-port must be greater than 0 and less than 65536. |
| CustomerNoOwnDomain | customer not own domain name[xxx] | 400 | customer not own domain name[xxx] |
| ConfigError | Can not find effective config form by domain : [xxx]\n\n | 400 | Can not find effective config form by domain : [xxx]\n\n |
| ConfigError | Can not find effective ConfServiceForm by domain : [xxx] | 400 | Can not find effective ConfServiceForm by domain : [xxx] |
| ConfigError | The required domain property dose not config at suit, property:origin-host. | 400 | The required domain property dose not config at suit, property:origin-host. |
| ConfigError | The required domain property dose not config at suit, property:origin-port. | 400 | The required domain property dose not config at suit, property:origin-port. |
| ConfigError | The origin-ips or origin-host or origin-port must have at least one. | 400 | The origin-ips or origin-host or origin-port must have at least one. |
| NoSuchDomain | The specified domain does not exist.\n\n | 404 | The specified domain does not exist.\n\n |
#!/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/domain/property/a.example.com" \
-X "PUT" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-H "Content-Type:application/json" \
-d '{
"origin-config":{
"origin-port":"1234",
"origin-ips":"1.1.1.1",
"origin-host":"a.example.com"
},
"description":"description"
}'HTTP/1.1 202 Accepted
Date: Fri, 17 May 2017 06:33:26 GMT
Content-Type: application/json;charset=utf-8
x-cnc-request-id:c54cbbb4-19fe-407a-930c-3988b62ed2fd
{
"message":"success",
"code":""
}