update-custom-domain-config
Modify and update custom domain routing configurations for Alibaba Cloud Function Compute, including protocols, routes, authentication, certificates, and TLS settings.
Instructions
更新函数计算的域名路由配置,修改域名路由配置
Input Schema
Name | Required | Description | Default |
---|---|---|---|
domain | Yes | 域名,例如example.com,域名不能带有'https://'或'http://'等协议内容 | |
region | No | 部署的区域,当前可选的区域是cn-hangzhou, cn-shanghai, cn-beijing, cn-shenzhen, cn-hongkong, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-5, ap-northeast-1, eu-central-1, eu-west-1, us-west-1, us-east-1, ap-south-1, me-east-1, cn-chengdu, cn-wulanchabu, cn-guangzhou,默认是cn-hangzhou | cn-hangzhou |
updateCustomDomainConfig | Yes |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"domain": {
"description": "域名,例如example.com,域名不能带有'https://'或'http://'等协议内容",
"type": "string"
},
"region": {
"default": "cn-hangzhou",
"description": "部署的区域,当前可选的区域是cn-hangzhou, cn-shanghai, cn-beijing, cn-shenzhen, cn-hongkong, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-5, ap-northeast-1, eu-central-1, eu-west-1, us-west-1, us-east-1, ap-south-1, me-east-1, cn-chengdu, cn-wulanchabu, cn-guangzhou,默认是cn-hangzhou",
"enum": [
"cn-hangzhou",
"cn-shanghai",
"cn-beijing",
"cn-shenzhen",
"cn-hongkong",
"ap-southeast-1",
"ap-southeast-2",
"ap-southeast-3",
"ap-southeast-5",
"ap-northeast-1",
"eu-central-1",
"eu-west-1",
"us-west-1",
"us-east-1",
"ap-south-1",
"me-east-1",
"cn-chengdu",
"cn-wulanchabu",
"cn-guangzhou"
],
"type": "string"
},
"updateCustomDomainConfig": {
"additionalProperties": false,
"properties": {
"authConfig": {
"additionalProperties": false,
"description": "权限认证配置",
"properties": {
"authType": {
"description": "认证类型,可选值为anonymous, function。anonymous:匿名认证,无需认证。function:函数签名校验认证。默认为匿名校验",
"enum": [
"anonymous",
"function"
],
"type": "string"
}
},
"type": "object"
},
"certConfig": {
"additionalProperties": false,
"description": "证书配置,如果要支持HTTPS协议,则必须要配置证书",
"properties": {
"certName": {
"description": "证书名称",
"type": "string"
},
"certificate": {
"description": "PEM格式证书内容,必须包含全部的证书内容,包括中间证书",
"type": "string"
},
"privateKey": {
"description": "PEM格式证书私钥",
"type": "string"
}
},
"required": [
"certName",
"privateKey",
"certificate"
],
"type": "object"
},
"protocol": {
"description": "域名路由配置的协议,可选值为HTTP, HTTPS, HTTP,HTTPS。HTTP:仅支持 HTTP 协议。HTTPS:仅支持 HTTPS 协议。HTTP,HTTPS:支持 HTTP 及 HTTPS 协议。",
"enum": [
"HTTP",
"HTTPS",
"HTTP,HTTPS"
],
"type": "string"
},
"routeConfig": {
"additionalProperties": false,
"properties": {
"routes": {
"description": "路由配置",
"items": {
"additionalProperties": false,
"description": "自定义域名路由路径配置。",
"properties": {
"functionName": {
"description": "路由的目标函数名称",
"type": "string"
},
"methods": {
"default": [
"GET",
"POST",
"PUT",
"DELETE",
"HEAD",
"OPTIONS"
],
"description": "HTTP方法,可选值为GET, POST, PUT, DELETE, HEAD, OPTIONS",
"items": {
"enum": [
"GET",
"POST",
"PUT",
"DELETE",
"HEAD",
"OPTIONS"
],
"type": "string"
},
"type": "array"
},
"path": {
"description": "HTTP协议中的PATH路径,例如/api/,或/api/*",
"type": "string"
},
"qualifier": {
"description": "路由的目标函数版本或别名,默认是LATEST",
"type": "string"
},
"rewriteConfig": {
"additionalProperties": false,
"description": "重写配置,可以采用精确匹配、通配匹配或正则匹配其中之一",
"properties": {
"equalRules": {
"description": "精确匹配规则列表",
"items": {
"additionalProperties": false,
"description": "自定义域名完全匹配重写规则配置",
"properties": {
"match": {
"description": "匹配规则",
"type": "string"
},
"replacement": {
"description": "替换规则",
"type": "string"
}
},
"required": [
"match",
"replacement"
],
"type": "object"
},
"type": "array"
},
"regexRules": {
"description": "正则匹配规则列表",
"items": {
"additionalProperties": false,
"description": "自定义域名正则重写规则配置",
"properties": {
"match": {
"description": "匹配规则",
"type": "string"
},
"replacement": {
"description": "替换规则",
"type": "string"
}
},
"required": [
"match",
"replacement"
],
"type": "object"
},
"type": "array"
},
"wildcardRules": {
"description": "通配匹配规则列表",
"items": {
"additionalProperties": false,
"description": "自定义域名通配符重写规则配置",
"properties": {
"match": {
"description": "匹配规则",
"type": "string"
},
"replacement": {
"description": "替换规则",
"type": "string"
}
},
"required": [
"match",
"replacement"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"equalRules",
"wildcardRules",
"regexRules"
],
"type": "object"
}
},
"required": [
"path",
"functionName"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"routes"
],
"type": "object"
},
"tlsConfig": {
"additionalProperties": false,
"description": "TLS配置,如果要支持HTTPS协议,则必须要配置TLS",
"properties": {
"cipherSuites": {
"description": "TLS密码套件,可选值为TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256。默认为TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
"items": {
"type": "string"
},
"type": "array"
},
"maxVersion": {
"description": "TLS版本,可选值为TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3。默认为TLSv1.2",
"type": "string"
},
"minVersion": {
"description": "TLS版本,可选值为TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3。默认为TLSv1.2",
"type": "string"
}
},
"required": [
"minVersion",
"maxVersion",
"cipherSuites"
],
"type": "object"
},
"wafConfig": {
"additionalProperties": false,
"description": "Web应用防火墙(WAF)配置",
"properties": {
"enable": {
"description": "是否开启WAF",
"type": "boolean"
}
},
"required": [
"enable"
],
"type": "object"
}
},
"required": [
"routeConfig",
"authConfig"
],
"type": "object"
}
},
"required": [
"domain",
"updateCustomDomainConfig"
],
"type": "object"
}