海外 ACDN 分发配置¶
POST 创建分发¶
POST /prod-api/acdn/cloudfrontRest/createDistribution
Body 请求参数
{
"allowedMethods": 1,
"domainName": "ztdemo.com",
"httpPort": 80,
"httpsPort": 443,
"isCompress": 1,
"isIpv6Enabled": 1,
"isLogging": 1,
"isOriginShield": 1,
"isSmoothStreaming": 1,
"oid": "202408211234",
"originIdName": "ztdemo.com",
"quantity": 1,
"viewerProtocolPolicy": "allow-all",
"comment": "",
"connectionTimeout": 10,
"originShieldRegion": "us-east-1",
"protocolVersionType": "TLSv1.2_2021",
"webACLId": "",
"isOptions": false,
"sslCertificateId": "",
"originPath": "",
"defaultRootObject": "",
"responseHeadersPolicyId": "1",
"priceClass": "PriceClass_All",
"connectionAttempts": 83,
"isHttpVersion": true,
"originKeepaliveTimeout": 5,
"originReadTimeout": 30,
"customHeaders": [
{
"headerValue": "1",
"headerName": "demo"
}
],
"isCookie": 0,
"protocolPolicy": "https-only",
"aliases": [
{
"value": "nulla voluptate"
}
],
"cachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e58f6"
}
请求参数¶
名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|---|
Authorization | header | string | 是 | none | |
body | body | object | 是 | none | |
» aliases | body | [object] | 否 | 备用(CNAME) | none |
» allowedMethods | body | integer(int32) | 否 | 允许 HTTP 方法 | none |
» cachePolicyId | body | string | 否 | 缓存策略 | none |
» comment | body | string | 否 | 说明 | none |
» connectionAttempts | body | integer(int32) | 否 | 连接次数 | none |
» connectionTimeout | body | integer(int32) | 否 | none | |
» customHeaders | body | [CustomHeadersVo] | 否 | 添加自定义标头 | none |
»» CustomHeadersVo | body | CustomHeadersVo | 否 | CustomHeadersVo | none |
»»» headerName | body | string | 否 | none | |
»»» headerValue | body | string | 否 | none | |
» defaultRootObject | body | string | 否 | 默认根对象 | none |
» domainName | body | string | 是 | 源域 | none |
» httpPort | body | integer(int32) | 是 | HTTP 端口 | 默认值为端口 80 |
» httpsPort | body | integer(int32) | 否 | HTTPS 端口 | 默认值为端口 443 |
» isCompress | body | integer(int32) | 是 | 自动压缩对象 | 0:表示否 |
» isCookie | body | integer(int32) | 否 | Ccookie 日志记录 | none |
» isHttpVersion | body | boolean | 是 | HTTP 版本 | none |
» isIpv6Enabled | body | integer(int32) | 否 | IPv6 | 0:表示关闭 |
» isLogging | body | integer(int32) | 否 | 标准日志记录 | 0:表示关闭 1:表示打开 |
» isOptions | body | boolean | 否 | 缓存 HTTP 方法 | 默认情况下,将会缓存 GET 和 HEAD 方法 |
» isOriginShield | body | integer(int32) | 否 | 启用源护盾 | 0:表示否 |
» isRealtimeLogConfig | body | integer(int32) | 否 | none | |
» isSmoothStreaming | body | integer(int32) | 否 | SmoothStreaming | 0:表示否 |
» isTrusted | body | integer(int32) | 否 | none | |
» oid | body | string | 是 | 套餐 | none |
» originIdName | body | string | 是 | 源名称 | none |
» originKeepaliveTimeout | body | integer(int32) | 否 | 保持连接超时 | CloudFront 与源保持空闲连接的秒数 – 1 到 60 秒。默认值为 5 秒 |
» originPath | body | string | 否 | 源路径 | 输入要附加到源请求的源域名的 URL 路径 |
» originReadTimeout | body | integer(int32) | 否 | 响应超时 | CloudFront 等待源响应的秒数 – 1 到 60 秒。默认值为 30 秒 |
» originRequestPolicyId | body | string | 否 | 源请求策略 | none |
» originShieldRegion | body | string | 否 | 选择一个 AWS 区域 | us-east-1:表示美国东部(弗吉尼亚北部) us-east-1 |
» priceClass | body | string | 是 | 价格级别 | PriceClass_All:表示使用所有边缘站点(最佳性能) |
» protocolPolicy | body | string | 否 | 仅 HTTP(http-only),仅 HTTPS(https-only),匹配查看器(match-viewer) | |
» protocolVersionType | body | string | 否 | 安全策略 | TLSv1.2_2021:表示 TLSv1.2_2021 (推荐) |
» quantity | body | integer(int32) | 是 | SSL 协议 | 1:表示 TLSv1.2 |
» realtimeLogConfigId | body | integer(int64) | 否 | none | |
» responseHeadersPolicyId | body | string | 否 | 标头策略 | none |
» sslCertificateId | body | string | 否 | SSL 证书 | none |
» trusted | body | TrustedVo | 否 | TrustedVo | none |
»» awsAccount | body | [object] | 否 | none | |
»» keyGroupsId | body | integer(int64) | 否 | none | |
»» trustedType | body | integer(int32) | 否 | none | |
» viewerProtocolPolicy | body | string | 是 | 协议策略 | allow-all:表示 HTTP 和 HTTPS |
» webACLId | body | string | 否 | none |
详细说明¶
» isCompress: 0:表示否 1:表示是
» isIpv6Enabled: 0:表示关闭 1:表示打开
» isOriginShield: 0:表示否 1:表示是
» isSmoothStreaming: 0:表示否 1:表示是
» priceClass: PriceClass_All:表示使用所有边缘站点(最佳性能) PriceClass_100:表示仅使用北美洲和欧洲 PriceClass_200:表示使用北美洲、欧洲、亚洲、中东和非洲
» protocolVersionType: TLSv1.2_2021:表示 TLSv1.2_2021 (推荐) TLSv1.2_2019:表示 TLSv1.2_2019 TLSv1.2_2018:表示 TLSv1.2_2018 TLSv1.1_2016:表示 TLSv1.1_2016 TLSv1_2016:表示 TLSv1_2016 TLSv1:表示 TLSv1
» quantity: 1:表示 TLSv1.2 2:表示 TLSv1.1 3:表示 TLSv1 4:表示 SSLV3
» viewerProtocolPolicy: allow-all:表示 HTTP 和 HTTPS redirect-to-https:表示重定向 HTTP 到 HTTPS https-only:表示 仅 HTTPS
返回示例
201 Response
返回结果¶
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | none | Inline |
201 | Created | none | Inline |
401 | Unauthorized | none | Inline |
403 | Forbidden | none | Inline |
404 | Not Found | none | Inline |
返回数据结构¶
状态码 200
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
» msg | string | true | none | none | |
» code | integer | true | none | none |
数据模型¶
CustomHeadersVo
CustomHeadersVo
属性¶
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
headerName | string | false | none | none | |
headerValue | string | false | none | none |
SaveDistributionVo
{
"aliases": [{}],
"allowedMethods": 0,
"cachePolicyId": "string",
"comment": "string",
"connectionAttempts": 0,
"connectionTimeout": 0,
"customHeaders": [
{
"headerName": "string",
"headerValue": "string"
}
],
"defaultRootObject": "string",
"domainName": "string",
"httpPort": 0,
"httpsPort": 0,
"isCompress": 0,
"isCookie": 0,
"isHttpVersion": true,
"isIpv6Enabled": 0,
"isLogging": 0,
"isOptions": true,
"isOriginShield": 0,
"isRealtimeLogConfig": 0,
"isSmoothStreaming": 0,
"isTrusted": 0,
"oid": "string",
"originIdName": "string",
"originKeepaliveTimeout": 0,
"originPath": "string",
"originReadTimeout": 0,
"originRequestPolicyId": "string",
"originShieldRegion": "string",
"priceClass": "string",
"protocolPolicy": "string",
"protocolVersionType": "string",
"quantity": 0,
"realtimeLogConfigId": 0,
"responseHeadersPolicyId": "string",
"sslCertificateId": "string",
"trusted": {
"awsAccount": [{}],
"keyGroupsId": 0,
"trustedType": 0
},
"viewerProtocolPolicy": "string",
"webACLId": "string"
}
SaveDistributionVo
属性¶
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
aliases | [object] | false | none | 备用(CNAME) | none |
allowedMethods | integer(int32) | false | none | 允许 HTTP 方法 | none |
cachePolicyId | string | false | none | 缓存策略 | none |
comment | string | false | none | 说明 | none |
connectionAttempts | integer(int32) | false | none | 连接次数 | none |
connectionTimeout | integer(int32) | false | none | none | |
customHeaders | [CustomHeadersVo] | false | none | 添加自定义标头 | none |
defaultRootObject | string | false | none | 默认根对象 | none |
domainName | string | true | none | 源域 | none |
httpPort | integer(int32) | true | none | HTTP 端口 | 默认值为端口 80 |
httpsPort | integer(int32) | false | none | HTTPS 端口 | 默认值为端口 443 |
isCompress | integer(int32) | true | none | 自动压缩对象 | 0:表示否 1:表示是 |
isCookie | integer(int32) | false | none | Ccookie 日志记录 | none |
isHttpVersion | boolean | true | none | HTTP 版本 | none |
isIpv6Enabled | integer(int32) | false | none | IPv6 | 0:表示关闭 1:表示打开 |
isLogging | integer(int32) | false | none | 标准日志记录 | 0:表示关闭 1:表示打开 |
isOptions | boolean | false | none | 缓存 HTTP 方法 | 默认情况下,将会缓存 GET 和 HEAD 方法 |
isOriginShield | integer(int32) | false | none | 启用源护盾 | 0:表示否 1:表示是 |
isRealtimeLogConfig | integer(int32) | false | none | none | |
isSmoothStreaming | integer(int32) | false | none | SmoothStreaming | 0:表示否 1:表示是 |
isTrusted | integer(int32) | false | none | none | |
oid | string | true | none | 套餐 | none |
originIdName | string | true | none | 源名称 | none |
originKeepaliveTimeout | integer(int32) | false | none | 保持连接超时 | CloudFront 与源保持空闲连接的秒数 – 1 到 60 秒。默认值为 5 秒 |
originPath | string | false | none | 源路径 | 输入要附加到源请求的源域名的 URL 路径 |
originReadTimeout | integer(int32) | false | none | 响应超时 | CloudFront 等待源响应的秒数 – 1 到 60 秒。默认值为 30 秒 |
originRequestPolicyId | string | false | none | 源请求策略 | none |
priceClass | string | true | none | 价格级别 | PriceClass_All:表示使用所有边缘站点(最佳性能) PriceClass_100:表示仅使用北美洲和欧洲 PriceClass_200:表示使用北美洲、欧洲、亚洲、中东和非洲 |
protocolPolicy | string | false | none | 协议 | http-only:表示仅 HTTP https-only:表示仅 HTTPS match-viewer:表示匹配查看器 |
protocolVersionType | string | false | none | 安全策略 | TLSv1.2_2021:表示 TLSv1.2_2021 (推荐) TLSv1.2_2019:表示 TLSv1.2_2019 TLSv1.2_2018:表示 TLSv1.2_2018 TLSv1.1_2016:表示 TLSv1.1_2016 TLSv1_2016:表示 TLSv1_2016 TLSv1:表示 TLSv1 |
quantity | integer(int32) | true | none | SSL 协议 | 1:表示 TLSv1.2 2:表示 TLSv1.1 3:表示 TLSv1 4:表示 SSLV3 |
realtimeLogConfigId | integer(int64) | false | none | none | |
responseHeadersPolicyId | string | false | none | 标头策略 | none |
sslCertificateId | string | false | none | SSL 证书 | none |
trusted | TrustedVo | false | none | none | |
viewerProtocolPolicy | string | true | none | 协议策略 | allow-all:表示 HTTP 和 HTTPS redirect-to-https:表示重定向 HTTP 到 HTTPS https-only:表示 仅 HTTPS |
webACLId | string | false | none | none |
TrustedVo
TrustedVo
属性¶
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
awsAccount | [object] | false | none | none | |
keyGroupsId | integer(int64) | false | none | none | |
trustedType | integer(int32) | false | none | none |
ValueVo
ValueVo
属性¶
名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
---|---|---|---|---|---|
value | string | false | none | none |