ALIYUN::ApiGateway::CustomDomain は、カスタムドメインを API グループにアタッチし、SSL 証明書をアップロードします。
説明
-
SSL 証明書は、カスタムドメイン名と一致している必要があります。
-
SSL 証明書をアタッチすると、API で HTTPS が有効になります。
構文
{
"Type": "ALIYUN::ApiGateway::CustomDomain",
"Properties": {
"CertificateBody": String,
"CertificateName": String,
"GroupId": String,
"CertificatePrivateKey": String,
"DomainName": String
}
}
プロパティ
|
プロパティ名 |
タイプ |
必須 |
更新可能 |
説明 |
制約 |
|
DomainName |
String |
はい |
いいえ |
カスタムドメイン名。 |
ドメイン名のアタッチに失敗した場合は、原因を特定して再試行してください。 |
|
GroupId |
String |
はい |
いいえ |
API グループの ID。 |
なし |
|
CertificateBody |
String |
いいえ |
はい |
証明書本文。 |
1 行の文字列である必要があります。改行には |
|
CertificateName |
String |
いいえ |
はい |
証明書名。 |
なし |
|
CertificatePrivateKey |
String |
いいえ |
はい |
証明書プライベートキー。 |
なし |
戻り値
Fn::GetAtt
CertificateId:証明書 ID。
例
説明
DomainName などのプレースホルダーを実際の値に置き換えてください。
YAML フォーマット
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
GroupId:
Type: String
Description: 操作対象の API グループ。
CertificateBody:
Type: String
CertificatePrivateKey:
Type: String
Resources:
CustomDomain:
Type: 'ALIYUN::ApiGateway::CustomDomain'
Properties:
GroupId:
Ref: GroupId
DomainName: ****.api.domain
CertificateName: demo_cert
CertificateBody:
Ref: CertificateBody
CertificatePrivateKey:
Ref: CertificatePrivateKey
JSON フォーマット
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"GroupId": {
"Type": "String",
"Description": "操作対象の API グループ。"
},
"CertificateBody": {
"Type": "String"
},
"CertificatePrivateKey": {
"Type": "String"
}
},
"Resources": {
"CustomDomain": {
"Type": "ALIYUN::ApiGateway::CustomDomain",
"Properties": {
"GroupId": {
"Ref": "GroupId"
},
"DomainName": "****.api.domain",
"CertificateName": "demo_cert",
"CertificateBody": {
"Ref": "CertificateBody"
},
"CertificatePrivateKey": {
"Ref": "CertificatePrivateKey"
}
}
}
}
}