Media Acceleration Live Broadcast

UpdateCdnDomain

更新時間: 2026-07-29 11:22:23

Modify the configurations of the specified accelerated domain name.

  • リミットの詳細: · The accelerated domain name must have been filed. · Accelerated domain names must not contain the following information: sales of drugs and controlled tools, including illegal speech and information. · Video-accelerated domain names must have audiovisual licenses; blog forums or community-based accelerated domain names must have BBS special approval qualifications. · Interface requests and return results only accept xml format.
  • 単一ユーザーの使用頻度: 300/5min
  • 使用できるプロダクト: Media Acceleration Live Broadcast,Content Acceleration,Dynamic Web Acceleration,Media Acceleration VoD,Flood Shield,Flood Shield 2.0
API認証の詳細については、以下を参照してください:API認証の概要

リクエストパラメータ

Path パラメータ

パラメータ名説明
*domainString

The domain you are going to modify, it can be domain id or domain name.

Body パラメータ

パラメータ名説明
versionString

The current version is 1.0.0.

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. )
commentString

Remarks, up to 1000 characters

cache-hostString

Cache file HOST. Cache rules for caching HOST domain names and accelerated domain names must be consistent.

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.

origin-configObject

Back-to-origin policy setting, which is used to set the origin site information and the back-to-origin policy of the accelerated domain name

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.
adv-origin-configsObject
detect-urlString

The advanced origin monitoring url, and requests <master-ips> through the url. If the response is neither 2** nor 3** response, it is considered that the primary source ip is faulty, and <backup-ips> is used at this time.

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.

default-origin-host-headerString

The Origin HOST for changing the HOST field in the return source HTTP request header. It should be domain name or IP format. For domain name, each segement separated by a dot, does not exceed 62 characters, the total length should not exceed 128 characters.

origin-portString

Origin port.

live-configObject

Live domain configuration, used to set the push and pull domain of live streaming.

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.

sslObject

SSL settings, to bind a certificate with the accelerated domain. You can use the interface [AddCertificate] to upload your certificates. If you want to modify a certificate, please use the interface: [UpdateCertificate].

use-sslString

Use a certificate, and the optional values are true and false, true means using this certificate, false means not using the certificate.

use-for-sniString

Use sni certificate, and the optional values are true and false, true means using sni certificate, false means using shared certificate (not supported)

ssl-certificate-idString

Certificate ID, and it is the certificate ID returned by the system after the new certificate is successfully added.

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.

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.

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.

publish-pointsList

Livestream domain settings. 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 [/]

レスポンスパラメータ

レスポンスヘッダ

パラメータ名説明
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

Body パラメータ

パラメータ名説明
codeString

Error code occurs when HTTP Status is not 202, indicating the error type of the current request calls.

messageString

Response information, demonstrates success when it is successful.

エラーコード

エラーコード(code)説明(message)HTTPステータスコード意味
InvalidParameter

The request has null config with null data-id, please remove it.

400The request has null config with null data-id, please remove it.
InternalError

Internal errors such as server exceptions, data acquisition failures, etc.

500Internal errors such as server exceptions, data acquisition failures, etc.
MalformedXML

The XML provided is incorrect or irregular

400The XML provided is incorrect or irregular
NoSuchDomain

The specified domain name does not exist

404The specified domain name does not exist
Forbidden

Domain name deleted

403Domain name deleted
ConfigError

Domain name change is not allowed

400Domain name change is not allowed
ConfigError

Domain name type is not allowed to be changed

400Domain name type is not allowed to be changed
ConfigError

No change to configuration sheet template ID is allowed

400No change to configuration sheet template ID is allowed
ConfigError

Specified Configuration does not match Specified Shared Level 1 Domain Name

409Specified Configuration does not match Specified Shared Level 1 Domain Name
InvalidOrigin

Error in domain name attribute value

400Error in domain name attribute value
InvalidOrigin

origin domain names and accelerated domain names cannot be the same

400origin domain names and accelerated domain names cannot be the same
InvalidOrigin

Illegal return ip/domain name

400Illegal return ip/domain name
InvalidOrigin

IP duplication

400IP duplication
InvalidOrigin

Package does not plan to return to source requests HOST

400Package does not plan to return to source requests HOST
InvalidOrigin

HoST configuration error for backsource request

400HoST configuration error for backsource request
InvalidOrigin

Can't modify the advanced source of domain name

400Can't modify the advanced source of domain name
CustomizedCnameError

Customized CNAME error.

409Customized CNAME error.
ConfigVersionOutOfDate

The version you provided has expired

409The version you provided has expired
CnameError

Cname Error

400Cname Error
ConfigFormNotExists

Error in domain name service area entry parsing

400Error in domain name service area entry parsing
NO_DOMAIN_2_UPDATE

Configuration does not exist

400Configuration does not exist
DOMAIN_NOT_USE_SSL

Configuration does not exist domain names without associated certificates

400Configuration does not exist domain names without associated certificates
NOT_SUPPORT_CERTIFICATE_CONFIG

Certificates must be used or cancelled at the same time

400Certificates must be used or cancelled at the same time
NOT_SUPPORT_CERTIFICATE_CONFIG

Certificate types are inconsistent

400Certificate types are inconsistent
NOT_SUPPORT_CERTIFICATE_CONFIG

Traditional (Sni) certificates are used, but multiple certificates are used

400Traditional (Sni) certificates are used, but multiple certificates are used
NOT_SUPPORT_CERTIFICATE_CONFIG

Traditional certificates are used, but the certificates corresponding to cnamelabel are inconsistent with the certificates used

400Traditional certificates are used, but the certificates corresponding to cnamelabel are inconsistent with the certificates used
NO_AVAILABLE_HTTPS_SERVICE_FORM

There is no available httpps service order to switch

400There is no available httpps service order to switch
NO_AVAILABLE_HTTPS_SERVICE_FORM

The product line of the current service order is not within the scope of allowing switching HTTPS service orders

400The product line of the current service order is not within the scope of allowing switching HTTPS service orders
NO_AVAILABLE_HTTPS_SERVICE_FORM

There is no package ID in the current service list

400There is no package ID in the current service list
NO_AVAILABLE_HTTPS_SERVICE_FORM

All domain names under the same configuration must use certificates at the same time.

400All domain names under the same configuration must use certificates at the same time.
APPG_NAME_EMPTY

Application Service Group Check Failed (Application Service Group Name is Empty)

400Application Service Group Check Failed (Application Service Group Name is Empty)
APPG_NOT_SUPPORT_HTTPS_8_API

Application Service Group failed to check (Application Service Group does not open HTTPS self-service)

400Application Service Group failed to check (Application Service Group does not open HTTPS self-service)
APPG_NOT_SUPPORT_HTTPS

Application Service Group failed to check (Application Service Group does not open HTTPS self-service)

400Application Service Group failed to check (Application Service Group does not open HTTPS self-service)
SERVICE_TYPE_NOT_USE_SNI_SSL

Domain name configuration cannot use SNI certificates

400Domain name configuration cannot use SNI certificates
SUIT_HAS_NOT_CONFIG_CERTIFICATE_SERVICE

The service list is of HTTPS type, but the package does not have a certificate-related secondary service.

400The service list is of HTTPS type, but the package does not have a certificate-related secondary service.
ERROR_CONFIG_PARAM

Configuration Single Configuration Item Error

400Configuration Single Configuration Item Error
CONFIG_NOT_OWN_DOMAIN_NAME

Cannot process the domain name

400Cannot process the domain name
DUPLICATE_DOMAIN_NAME

Domain name duplication in entry

400Domain name duplication in entry

入力例

JSON
XML
JSON
リクエスト例
コピー コピー完了
#!/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}/cdnw/api/domain/a1.example.com" \
-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": "1.1.1.0",
        "default-origin-host-header": "a.example.com"
      },
     "ssl":{
             "use-ssl":"",
             "use-for-sni":"",
             "ssl-certificate-id":""
             },
     "cache-behaviors": [{
        "path-pattern": "/jpg",
        "ignore-cache-control": "true",
        "cache-ttl": "1800",
        "cache-unit": "s"
    }]
   "header-of-clientip":"X-Forwarded-For"
}'
レスポンス例
コピー コピー完了
HTTP/1.1 202 Accepted
Date: Fri, 17 May 2017 06:33:26 GMT
Content-Type: application/xml;charset=utf-8
x-cnc-request-id:c54cbbb4-19fe-407a-930c-3988b62ed2fd
x-cnc-deploy-version:1420084740000
{"message":"success"}