Batch acquisition of acceleration domain configuration - GetUcdnDomainConfig
Overview
Batch acquisition of acceleration domain configuration
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is GetUcdnDomainConfig . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
ProjectId | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface. | No |
Offset | int | Data offset, default is 0, non-negative integer | No |
Limit | int | Return data length, default is all, non-negative integer | No |
DomainId.N | string | Domain ID, the ID generated when creating a domain. By default, it fetches all domain information under the account, where n is a natural number, starting from DomainId.0. | No |
ChannelType | string | Product type ucdn, can be left blank, default is ucdn | No |
Domain.N | string | Domain Name | No |
IsDcdn | boolean | Is it dynamically accelerated? The default is false. | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
DomainList | array[DomainConfigInfo] | The obtained domain information, refer to the following DomainConfig | Yes |
Data Model
DomainConfigInfo
Field Name | Type | Description Information | Required |
---|---|---|---|
AreaCode | string | Query bandwidth area: 'cn' represents domestic, 'abroad' represents overseas, 'all' represents all areas. | Yes |
CdnType | string | The business type of the accelerated domain name, 'web' represents website, 'stream' represents video, 'download' represents download. | Yes |
Status | string | The current status of the acceleration domain name created. 'check' represents under review; 'checkSuccess' represents review passed; 'checkFail' represents review failed; 'enable' represents accelerating; 'disable' represents acceleration stopped; 'delete' represents acceleration deleted; 'enableing' represents acceleration is being enabled; 'disableing' represents acceleration is being disabled; 'deleteing' represents being deleted; 'deploying' represents deploying. | Yes |
Cname | string | CDN domain name. The CDN domain name generated when creating an acceleration domain name, used for setting CNAME records. | Yes |
CreateTime | int | The time of domain creation. Format: Timestamp. | Yes |
TestUrl | string | Test URL. Used for testing when creating acceleration for domain names. | Yes |
HttpsStatusCn | string | Domestic HTTPS status enableing - Enabling fail - Enabling failed enable - Enabled disable - Not enabled | Yes |
HttpsStatusAbroad | string | Overseas HTTPS status enableing - Enabling, fail - Enabling failed, enable - Enabled, disable - Not enabled | Yes |
CertNameCn | string | Domestic Certificate Name | Yes |
CertNameAbroad | string | Foreign Certificate Name | Yes |
Tag | string | Business Group: Default | Yes |
DomainId | string | Domain Id | No |
Domain | string | Domain Name | No |
OriginConf | OriginConf | Reference to OriginConf | No |
AccessControlConf | AccessControlConf | Access Control Configuration Refer to AccessControlConf | No |
CacheConf | CacheAllConfig | Cache Configuration Refer to CacheAllConfig | No |
AdvancedConf | AdvancedConf | Advanced Configuration Reference AdvancedConf | No |
OriginConf
Field Name | Type | Description Information | Required |
---|---|---|---|
OriginIpList | array[string] | The source IP is the IP address that the CDN server accesses when it returns to the source. Multiple source IPs can be expressed like this, for example: ["1.1.1.1","2.2.2.2"]. | No |
OriginHost | string | Back-to-source Http request header Host, the default is the acceleration domain name | No |
OriginPort | int | Origin Port | No |
BackupOriginEnable | boolean | 1 If set to false, it means that BackupOriginIp is empty, indicating that there is no backup source station, and the fields BackupOriginIp, BackupOriginHost should be ignored 2 If set to true, it means that there must be at least one backup source station address in BackupOriginIp.n | No |
BackupOriginIpList | array[string] | The backup source station IP is the IP address accessed by the CDN server when it returns to the source. Multiple source station IPs can be expressed like this, such as: ["1.1.1.1","2.2.2.2"]. | No |
BackupOriginHost | string | Backup source Http request header Host, the default is the acceleration domain name. | No |
OriginErrorCode | string | The return error code of the main source response (such as: 404|500), default is an empty string | No |
OriginErrorNum | int | The number of failures in returning to the primary source, default is 1. | No |
OriginProtocol | string | Origin Protocol http, http|https Default http | No |
OriginFollow301 | int | Follow 301 Redirect 0=Do not follow 1=Follow | No |
AccessControlConf
Field Name | Type | Description Information | Required |
---|---|---|---|
IpBlackList | array[string] | IP blacklist, multiple IPs, can be represented as: IpBlackList.0=1.1.1.1, IpBlackList.1=2.2.2.2 | No |
ReferConf | ReferConf | refer configuration | No |
CacheAllConfig
Field Name | Type | Description Information | Required |
---|---|---|---|
CacheHost | string | CacheHost, different domain names can be configured to the same CacheHost to achieve cache sharing, the default is the accelerated domain name. | No |
CacheList | array[CacheConf] | Cache configuration list, see CacheConf | No |
HttpCodeCacheList | array[CacheConf] | Status code cache configuration list, see CacheConf | No |
CacheKeyList | array[CacheKeyInfo] | Ignore the parameter cache configuration list, see CacheKeyInfo | No |
AdvancedConf
Field Name | Type | Description Information | Required |
---|---|---|---|
HttpClientHeader | array[string] | Client Response HTTP Header List | No |
HttpOriginHeader | array[string] | Source HTTP Header List | No |
Http2Https | boolean | HTTP to HTTPS back to source, true for yes, false for no | No |
WebSocketEnable | boolean | Enable websocket? | No |
QuicEnable | boolean | Enable QUIC? | No |
CacheConf
Field Name | Type | Description Information | Required |
---|---|---|---|
PathPattern | string | Path mode, supports regular expression | Yes |
CacheTTL | int | Caching Time | Yes |
CacheUnit | string | Unit of cache time. sec (seconds), min (minutes), hour (hours), day (days). The upper limit is 1 year. | Yes |
CacheBehavior | boolean | Whether to cache, true for caching, false for not caching. In the case of false, CacheTTL and CacheUnit are forced to be ineffective. | Yes |
HttpCodePattern | string | Status code mode, non-200, 206 status codes, multiple status codes are separated by a vertical line (|), this attribute is only returned in the status code cache configuration list. | No |
Description | string | Caching Rule Description | No |
FollowOriginRule | boolean | Whether to prioritize following the source station's header caching strategy, false means not prioritizing the source station, true means prioritizing the source station's caching header. The default is 0. | No |
CacheKeyInfo
Field Name | Type | Description Information | Required |
---|---|---|---|
Ignore | boolean | Ignore? | No |
PathPattern | string | Path mode, supports regular expression | No |
QueryString | string | Custom variables, starting with the $ symbol, multiple variables are connected with a plus (+), $querystring represents all variables. | No |
ReferConf
Field Name | Type | Description Information | Required |
---|---|---|---|
ReferType | int | Refer Anti-theft Chain Configuration 0Whitelist, 1Blacklist | No |
NullRefer | int | When ReferType is set to whitelist (delete), NullRefer set to 0 means NULL refer access is not allowed, and set to 1 means NULL refer access is allowed. | No |
ReferList | array[string] | Refer to the anti-theft chain rule list, supports regular expressions | No |
Example
Request Example
http://api.spark.ucloud.cn/?Action= GetUcdnDomainConfig
& DomainId.0=domain-0331qd
&ChannelType=sdVTSYmK
&Domain.n=AhjiGKwI
&IsDcdn=false
Response Example
{
"Action": " GetUcdnDomainConfigResponse",
"DomainList": [
{
"AccessConf": {
"IpBlackList": [
"2.2.2.2",
"3.3.3.3"
],
"ReferConf": {
"NullRefer": 0,
"ReferList": [
"www.baidu.com",
"www.ucloud.com"
],
"ReferType": 0
}
},
"AdvancedConf": {
"Http2Https": true,
"HttpClientHeader": [
"Access-Control-Allow-Origin:*",
"Access-Control-Request-Method:GET"
],
"HttpOriginHeader": [
"Access-Control-Allow-Origin:*",
"Access-Control-Request-Method:GET"
]
},
"AreaCode": "cn",
"CacheConf": {
"CacheHost": "share.ucloud.cn",
"CacheList": [
{
"CacheBehavior": true,
"CacheTTL": 12,
"CacheUnit": "hour",
"Description": "网站首页",
"FollowOriginRule": false,
"IgnoreQueryString": true,
"PathPattern": "/"
},
{
"CacheBehavior": true,
"CacheTTL": 12,
"CacheUnit": "hour",
"Description": "所有文件",
"FollowOriginRule": false,
"IgnoreQueryString": true,
"PathPattern": "/*.*"
}
]
},
"CdnType": "web",
"CertName": "ucloud_2019",
"Cname": "9sqlhpr2.cdn.ucloud.cn",
"CreateTime": 1392974921,
"Domain": "abc.ucloud.cn",
"DomainId": "domain-0331qd",
"HttpsStatusAbroad": "enable",
"HttpsStatusCn": "enable",
"OriginConf": {
"OriginFollow301": 0,
"OriginHost": "www.xx.com",
"OriginIpList": [
"1.1.1.1",
"2.2.2.2"
],
"OriginPort": 80,
"OriginProtocol": "http"
},
"Status": "enable",
"Tag": "Default",
"TestUrl": "http://static.ucloud.cn/logogg.jpg"
}
],
"RetCode": 0
}