Content Acceleration,Dynamic Web Acceleration,Media Acceleration VoD,Media Acceleration Live Broadcast
To modify configuration of the specified domain; both domain name and domain name ID are supported.
Single user trigger frequency: 300/5min
| Name | Description |
|---|---|
*domainString | Domain ID or domain name. |
| Name | Description |
|---|---|
versionString | Version, the current version is 1.0.0 |
commentString | Remarks, up to 1000 characters. |
service-areasString | The acceleration area of the acceleration domain, if the resource coverage needs to be limited according to the area, the acceleration area needs to be specified. When no acceleration area is specified, we will provide acceleration services with optimal resource coverage according to the service area opened by the customer. Multiple regions are separated by semicolons, and the supported regions are as follows: cn (Mainland China), am (Americas), emea (Europe, Middle East, Africa), apac (Asia-Pacific region). |
cname-labelString | If you need to share a CNAME between domains, you can use this parameter. This parameter is a unique label for a public CNAME. Domains with the same cname-label will have the same CNAME.
Note:
1. Domains with the same cname-label have the same coverage.
2. Constraints of sharing a CNAME: consistent service-type, consistent certificate-id (if there is a certificate), consistent service-areas
3. Multiple http domains can share a CNAME, multiple sni https domains can share a CNAME too.
4. When a cname-label is used by a single domain, then the domain can be canceled acceleration. While a cname-label using by more then one domains, they can not be canceled acceleration.
5. Support the purpose of modifying cname by modifying cname-label. ) |
origin-configObject | Back to origin policy settings for setting source site information and return source policies for accelerated domain names |
origin-ipsString | Origin address, which can be an IP or domain name.
1. Multiple IPs are supported, separated by semicolons.
2. Only one domain name is allowed. IP and domain name cannot exist at the same time.
3. The length cannot exceed 500 characters.
4. The number of IPs cannot exceed 15. |
default-origin-host-headerString | Back-to-origin HOST, used to change the HOST field in the back-to-origin HTTP request header. The supported formats are: ① domain name ③ ip
Note:
1. Must comply with the ip/domain name format specification. If it is a domain name, the length of the domain name must be less than or equal to 128 characters. |
origin-portString | Origin port. |
adv-origin-configsObject | |
detect-periodString | Advanced source monitoring period, and the unit is in seconds, optional as an integer greater than or equal to 0, 0 means no monitoring |
adv-origin-configList | adv-origin-config |
master-ipsString | The advanced source mainly returns the source IP. Multiple IPs are separated by a semicolon ';', and the returned source IP cannot be repeated. |
backup-ipsString | Advanced source backup source IP, multiple IPs are separated by semicolon ';', and the returned source IP cannot be duplicated. |
detect-urlString | The advanced origin monitoring url, and requests |
sslObject | SSL settings, to bind a certificate with the accelerated domain. You can use the interface [CreateCertificateV2] to upload your certificates. If you want to modify a certificate, please use the interface: [UpdateCertificateV2] |
use-sslString | Use a certificate, true means to use the certificate, false means not to use the certificate |
use-for-sniString | Use sni certificate, true means use sni certificate, false means use shared certificate (not supported) |
ssl-certificate-idInteger | Certificate ID: The certificate ID returned by the system after successfully adding a new certificate.
ssl-certificate-id can only be passed when use-ssl is true. |
cache-hostString | Cache file HOST.
Cache rules for caching HOST domain names and accelerated domain names must be consistent. |
enable-httpdnsString | Enable httpdns settings.
The optional values are true and false, true means enabled; false means off. This function is not enabled by default. If you need it, please contact the technical support to apply for this feature. |
header-of-clientipString | Pass the response header of client IP. The optional values are Cdn-Src-Ip, X-Forwarded-For and ori_X-Forwarded-For. The default value is Cdn-Src-Ip. |
live-configObject | Live domain name configuration, used to set the push flow of live acceleration domain name |
origin-ipsString | Source station IP. When the stream-type is pull, at least one of the source station IP and the companion push stream domain name is not empty.
1. If it is a push-pull flow package, fill in 127.0.0.1, and the system will also default to 127.0.0.1.
2. If it is directly returning to the source, fill in the source IP of the source pull stream. |
origin-push-hostString | A matching push domain name is used to set up a current domain name corresponding to the live streaming domain name. When the stream-type is pull, the source station IP and the supporting current domain name are at least one empty; when stream-type is push, it does not need to be introduced. |
publish-pointsList | Set the publishing point of the live push-pull domain.
Note:
1. The pull stream and the corresponding push stream domain must be configured with the same publishing point.
2. If you are not going to modify the publishing point, please do not pass this param.
3. The publishing point adopts the overlay update. Each time you modify, you need to submit all the publishing points. You cannot submit only the parts that need to be modified. |
uriString | Livestream domain settings. Publish point, support multiple, do not pass the system by default to generate a publishing point uri for [/] |
back-to-origin-rewrite-ruleObject | Back to origin rewrite rule. |
protocolString | The specified protocol is either http or https. |
portString | If the protocol is http, the default is 80. If the protocol is https, the default is 443 |
descriptionString | description |
cache-behaviorsList | Cache policy settings are for setting cache rules for accelerated domain names |
path-patternString | The url matching mode supports fuzzy regularization. The optional values are?: /(a|b)/*.(jpg|bmp|png|gif) and other regular contents. If you want to modify the caching rules, this item is required. |
priorityString | Indicates the priority of a configuration, the larger the value, the higher the priority. |
ignore-cache-controlString | Ignore that the source station does not cache the header. The optional values are true and false, which are used to ignore the two configurations of cache-control in the request header (private, no-cache) and the authorization is set by the client. |
cache-ttlString | Cache Time: Set the time corresponding to the cache object. Input Parameters format: integer, set to 0 if no cache is used. There is no upper limit on the cache time rule. The time is set attuned to the customer's own needs. If the customer feels that some of the files does not change frequently, then the setting is longer. For example, the text class js, css, html, etc. can be set shorter, the picture, video and audio classes can be set longer (because the cache time will be replaced by the new file due to the file heat algorithm, the suggestion is that the length should not exceed one month)
If you want to modify the caching rules, this item is required. |
cache-unitString | Cache Time unit: Set the time unit corresponding to the cache object: such as s, m, h, d. If no unit is entered, the default is seconds. |
| Name | Description |
|---|---|
x-cnc-request-idString | Uniquely labeled id for querying each requested task (for all interfaces) |
x-cnc-deploy-versionString | The corresponding deployment version number of this modification |
| Name | Description |
|---|---|
codeString | Error code, which appears when HTTPStatus is not 202, represents the error type of the current request call |
messageString | Response information, success when successful |
| Error code(code) | Description(message) | HTTP status | Semantic |
|---|---|---|---|
| InternalError | Server exception. Encounter internal error including data extraction error. | 500 | Server exception. Encounter internal error including data extraction error. |
| NoSuchDomain | Designated domain name is not found | 404 | Designated domain name is not found |
| Forbidden | Domain name has been deleted | 403 | Domain name has been deleted |
| CustomizedCnameError | Customer shares level 1 error | 409 | Customer shares level 1 error |
| CnameError | Share level 1 error | 400 | Share level 1 error |
| DomainExistsCdnAreaError | Domain name parse error of service region | 409 | Domain name parse error of service region |
| ConfigFormNotExists | The configuration does not exist. | 400 | The configuration does not exist. |
| PARAM_INVALID | Parameter {0} is null or illegal | 400 | Parameter {0} is null or illegal |
| PARSE_PARAM_ERROR | Parameter input parse error | 400 | Parameter input parse error |
| NO_DOMAIN_2_UPDATE | Domain name is not found when modifying its configuration | 400 | Domain name is not found when modifying its configuration |
| ERROR_CONFIG_PARAM | Configuration error when setting single configuration | 400 | Configuration error when setting single configuration |
| CONFIG_NOT_OWN_DOMAIN_NAME | Can not deal with this domain name. | 400 | Can not deal with this domain name. |
| DUPLICATE_DOMAIN_NAME | Domain name duplicates in parameter input | 400 | Domain name duplicates in parameter input |
| InvalidBanUrl | Shielding url is not unique | 400 | Shielding url is not unique |
| banUrlsExcessive | Shielding url is excessive | 403 | Shielding url is excessive |
| banUrlsExist | The shielding url already exists | 400 | The shielding url already exists |
| banUrlsNotExist | The shielding url you want to cancel does not exist | 400 | The shielding url you want to cancel does not exist |
| DOMAIN_NOT_USE_SSL | The domain name does not use the related certificate | 400 | The domain name does not use the related certificate |
| NO_AVAILABLE_HTTPS_SERVICE_FORM | Certificate should be used for domain names in the same configuration form. | 400 | Certificate should be used for domain names in the same configuration form. |
| APPG_NAME_EMPTY | Cannot pass the checking of application group (the application group name is empty) | 400 | Cannot pass the checking of application group (the application group name is empty) |
| APPG_NOT_SUPPORT_HTTPS_8_API | Cannot pass the checking of application group (The app group does not support HTTPS by API). | 400 | Cannot pass the checking of application group (The app group does not support HTTPS by API). |
| APPG_NOT_SUPPORT_HTTPS | Cannot pass the checking of application group (The app group does not support PS). | 400 | Cannot pass the checking of application group (The app group does not support PS). |
| MissingBody | Lack of requestor | 400 | Lack of requestor |
| MalformedXML | The xml supplied is incorrect or not in order | 400 | The xml supplied is incorrect or not in order |
| ConfigError | The specified configuration does not match the specified common level domain name | 409 | The specified configuration does not match the specified common level domain name |
| InvalidOrigin | Cannot modify the advanced source of a domain name | 400 | Cannot modify the advanced source of a domain name |
| ConfigVersionOutOfDate | The version you provide is out of date | 409 | The version you provide is out of date |
| AtLeastHasOneResult | The format of the live broadcast authentication right cannot be null | 400 | The format of the live broadcast authentication right cannot be null |
| DuplicateAuthorizeCustomParam | Live Broadcast Source Authentication Variable Parameter Key Unique Checksum | 400 | Live Broadcast Source Authentication Variable Parameter Key Unique Checksum |
| ERROR_CONFIG_PARAM_SERVICE | Secondary service background check not approved | 400 | Secondary service background check not approved |
| NOT_SUPPORT_CERTIFICATE_CONFIG | Uses traditional certificates, but the certificate for cnamelabel does not match the certificate for which it is used | 400 | Uses traditional certificates, but the certificate for cnamelabel does not match the certificate for which it is used |
| SERVICE_TYPE_NOT_USE_SNI_SSL | Domain name configuration cannot use sni certificates | 400 | Domain name configuration cannot use sni certificates |
| SUIT_HAS_NOT_CONFIG_CERTIFICATE_SERVICE | The service list is https-type, but there is no certificate-configured related secondary service for the suite | 400 | The service list is https-type, but there is no certificate-configured related secondary service for the suite |
| NOT_ALLOW_SRC_IP_AS_ACCELERATE_DOMAIN | The back-to-origin domain of this domain is also another accelerated domain, which may lead to abnormal access to the accelerated domain . | 400 | The back-to-origin domain of this domain is also another accelerated domain, which may lead to abnormal access to the accelerated domain . |
| NOT_ALLOW_ACCELERATE_DOMAIN_AS_SRC_IP | This accelerated domain is duplicated with another back-to-origin domain, which may lead to abnormal access to the accelerated domain.\n | 400 | This accelerated domain is duplicated with another back-to-origin domain, which may lead to abnormal access to the accelerated domain.\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/123344" \
-X "PUT" \
-u "$username:$password" \
-H "Date: $date" \
-H "Accept: application/json" \
-H "Content-Type:application/json" \
-d '{
"comment": "my comment here",
"origin-config": {
"origin-ips": "www.wss.com",
"default-origin-host-header": "www.baidu.co121"
},
"ssl":{
"use-ssl":"",
"use-for-sni":"",
"ssl-certificate-id":""
},
"back-to-origin-rewrite-rule":{
"protocol":"http",
"port":"80"
},
"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"}