構文
{
"Type": "ALIYUN::FC::CustomDomain",
"Properties": {
"ApiVersion": String,
"Protocol": String,
"RouteConfig": Map,
"CertConfig": Map,
"DomainName": String
}
}
プロパティ
| プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
| ApiVersion | String | いいえ | はい | API のバージョン。 | なし |
| Protocol | String | はい | はい | プロトコルタイプ。 | 有効な値: |
| RouteConfig | Map | いいえ | はい | ルートテーブルの構成。 | 詳細については、RouteConfig プロパティをご参照ください。 |
| CertConfig | Map | いいえ | はい | 証明書の情報。 | 詳細については、CertConfig プロパティをご参照ください。 |
| DomainName | String | はい | いいえ | ドメイン名。 | なし |
RouteConfig 構文
"RouteConfig": {
"Routes": List
}
RouteConfig プロパティ
| プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
| Routes | List | はい | はい | ルートのリスト。 | 詳細については、Routes プロパティをご参照ください。 |
Routes 構文
"Routes": [
{
"Path": String,
"FunctionName": String,
"ServiceName": String,
"Qualifier": String
}
]
Routes プロパティ
| プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
| Path | String | はい | はい | カスタムドメイン名のリクエストパス。例:/login/*。 | なし |
| Qualifier | String | いいえ | いいえ | リクエストパスのエイリアス。 | なし |
| FunctionName | String | はい | はい | リクエストパスに対応する関数。 | なし |
| ServiceName | String | はい | はい | 関数が属するサービス。 | なし |
CertConfig 構文
"CertConfig": {
"CertName": String,
"PrivateKey": String,
"Certificate": String
}
CertConfig プロパティ
| プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
| CertName | String | はい | はい | 証明書の カスタム名。 | なし |
| PrivateKey | String | はい | はい | 秘密鍵。 | 改行 (\n) を使用して 1 行でこのパラメーターを指定します。 |
| Certificate | String | はい | はい | 証明書の内容。 | 改行 (\n) を使用して 1 行でこのパラメーターを指定します。 |
レスポンスパラメーター
Fn::GetAtt
- DomainName: ドメイン名。
- Domain: プロトコルとドメイン名。
例
YAML 形式
ROSTemplateFormatVersion: '2015-09-01'
Parameters: {}
Resources:
CustomDomain:
Type: ALIYUN::FC::CustomDomain
Properties:
Protocol: HTTP
DomainName: TestDomain
Outputs:
DomainName:
Description: The domain name
Value:
Fn::GetAtt:
- CustomDomain
- DomainName
Domain:
Description: The domain with protocol.
Value:
Fn::GetAtt:
- CustomDomain
- Domain
JSON 形式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
},
"Resources": {
"CustomDomain": {
"Type": "ALIYUN::FC::CustomDomain",
"Properties": {
"Protocol": "HTTP",
"DomainName": "TestDomain"
}
}
},
"Outputs": {
"DomainName": {
"Description": "ドメイン名",
"Value": {
"Fn::GetAtt": [
"CustomDomain",
"DomainName"
]
}
},
"Domain": {
"Description": "プロトコル付きのドメイン。",
"Value": {
"Fn::GetAtt": [
"CustomDomain",
"Domain"
]
}
}
}
}