建立自訂網域名。
介面說明
如果您希望在生產環境中通過固定網域名稱訪問Function Compute中建立的應用或函數,或者解決訪問 HTTP 觸發器時強制下載行為,可以通過為應用或函數綁定自訂網域名來實現。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
fc:CreateCustomDomain |
create |
*全部資源
|
無 | 無 |
請求文法
POST /2023-03-30/custom-domains HTTP/1.1
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| body | CreateCustomDomainInput |
是 |
自訂網域名資訊 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
| CustomDomain |
自訂網域名資訊 |
樣本
正常返回樣本
JSON格式
{
"accountId": "186851234023****",
"apiVersion": "2023-03-30",
"authConfig": {
"authInfo": "{}",
"authType": "anonymous"
},
"certConfig": {
"certName": "my-cert",
"certificate": "PEM format",
"privateKey": "PEM format"
},
"createdTime": "2023-03-30T08:02:19Z",
"domainName": "example.com",
"lastModifiedTime": "2023-03-30T08:02:19Z",
"protocol": "HTTP",
"routeConfig": {
"routes": [
{
"functionName": "myFunction",
"methods": [
"GET"
],
"path": "/api/*",
"qualifier": "myAlias",
"rewriteConfig": {
"equalRules": [
{
"match": "/old",
"replacement": "/new"
}
],
"regexRules": [
{
"match": "^/api/.+?/(.*)",
"replacement": "/api/v2/$1"
}
],
"wildcardRules": [
{
"match": "/api/*",
"replacement": "/$1"
}
]
}
}
]
},
"subdomainCount": "1",
"tlsConfig": {
"cipherSuites": [
"TLS_RSA_WITH_RC4_128_SHA"
],
"maxVersion": "TLSv1.3",
"minVersion": "TLSv1.2"
},
"wafConfig": {
"enableWAF": true
}
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。