DATASOURCE::FC::CustomDomains类型用于获取函数服务的自定义域名列表。
语法
{
"Type": "DATASOURCE::FC::CustomDomains",
"Properties": {
"Prefix": String
}
}
属性
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
Prefix |
String |
否 |
是 |
自定义域名的前缀。 |
名称必须以Prefix作为前缀。例如:Prefix是a,则返回的资源名均以a开始。 |
返回数据(Fn::GetAtt)
- CustomDomains:自定义域名详情列表。
- DomainNames:域名列表。
属性名称 |
类型 |
描述 |
约束 |
DomainNames |
List |
域名列表。 |
无 |
CustomDomains |
List |
自定义域名详情列表。 |
无 |
DomainName |
String |
域名。 |
无 |
AccountId |
String |
账号ID。 |
无 |
Protocol |
String |
域名支持的协议类型。 |
取值:
- HTTP:仅支持HTTP协议。
- HTTP/HTTPS:支持HTTP及HTTPS协议。
|
ApiVersion |
String |
API版本。 |
无 |
CreatedTime |
String |
域名的创建时间。 |
无 |
LastModifiedTime |
String |
域名上一次被更新的时间。 |
无 |
CertConfig |
Map |
HTTPS证书的配置信息。 |
示例:{ "CertName": "/login/", "Certificate": "-----BEGIN CERTIFICATE----- xxxxx -----END
CERTIFICATE-----", "PrivateKey": "-----BEGIN RSA PRIVATE KEY----- xxxxx -----END RSA
PRIVATE KEY-----"} |
RouteConfig |
Map |
定义域名访问时Path到Function的映射。 |
示例:{ "Routes": [ { "FunctionName": "function_name", "Methods": [ "GET" ], "Path": "/login/*",
"Qualifier": "test", "ServiceName": "service_name" } ]} |
TlsConfig |
Map |
TLS配置。 |
无 |
示例
-
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Prefix": {
"Type": "String",
"Description": "Qualified returned custom domain names must be prefixed with Prefix. For example, if the Prefix is \"a\", the returned custom domain names should be started with \"a\"."
}
},
"Resources": {
"CustomDomains": {
"Type": "DATASOURCE::FC::CustomDomains",
"Properties": {
"Prefix": {
"Ref": "Prefix"
}
}
}
},
"Outputs": {
"CustomDomains": {
"Description": "The list of custom_domain.",
"Value": {
"Fn::GetAtt": [
"CustomDomains",
"CustomDomains"
]
}
},
"DomainNames": {
"Description": "The list of custom_domain names.",
"Value": {
"Fn::GetAtt": [
"CustomDomains",
"DomainNames"
]
}
}
}
}
-
YAML
格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
Prefix:
Type: String
Description: Qualified returned custom domain names must be prefixed with Prefix. For example, if the Prefix is "a", the returned custom domain names should be started with "a".
Resources:
CustomDomains:
Type: DATASOURCE::FC::CustomDomains
Properties:
Prefix:
Ref: Prefix
Outputs:
CustomDomains:
Description: The list of custom_domain.
Value:
Fn::GetAtt:
- CustomDomains
- CustomDomains
DomainNames:
Description: The list of custom_domain names.
Value:
Fn::GetAtt:
- CustomDomains
- DomainNames