ALIYUN::APIG::Domain类型用于创建域名。
语法
{
"Type": "ALIYUN::APIG::Domain",
"Properties": {
"DomainName": String,
"Protocol": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
DomainName | String | 是 | 否 | 域名。 | 无。 |
Protocol | String | 是 | 是 | 域名支持的协议类型。 | 取值:
|
返回值
Fn::GetAtt
DomainId:域名 id。
DomainName:域名。
Protocol:域名支持的协议类型。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
DomainName:
Description:
en: The name of the Domain.
MaxLength: 128
MinLength: 1
Required: true
Type: String
Protocol:
AllowedValues:
- HTTP
- HTTPS
Description:
en: 'The types of protocols supported by the domain are as follows:
* HTTP: Supports only the HTTP protocol.
* HTTPS: Supports only the HTTPS protocol.'
Required: true
Type: String
Resources:
ExtensionResource:
Properties:
DomainName:
Ref: DomainName
Protocol:
Ref: Protocol
Type: ALIYUN::APIG::Domain
Outputs:
DomainId:
Description: The ID of the Domain.
Value:
Fn::GetAtt:
- ExtensionResource
- DomainId
DomainName:
Description: The name of the Domain.
Value:
Fn::GetAtt:
- ExtensionResource
- DomainName
Protocol:
Description: The types of protocols.
Value:
Fn::GetAtt:
- ExtensionResource
- Protocol
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"DomainName": {
"Type": "String",
"Description": {
"en": "The name of the Domain."
},
"Required": true,
"MinLength": 1,
"MaxLength": 128
},
"Protocol": {
"Type": "String",
"Description": {
"en": "The types of protocols supported by the domain are as follows:\n* HTTP: Supports only the HTTP protocol.\n* HTTPS: Supports only the HTTPS protocol."
},
"AllowedValues": [
"HTTP",
"HTTPS"
],
"Required": true
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::APIG::Domain",
"Properties": {
"DomainName": {
"Ref": "DomainName"
},
"Protocol": {
"Ref": "Protocol"
}
}
}
},
"Outputs": {
"DomainId": {
"Description": "The ID of the Domain.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"DomainId"
]
}
},
"DomainName": {
"Description": "The name of the Domain.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"DomainName"
]
}
},
"Protocol": {
"Description": "The types of protocols.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Protocol"
]
}
}
}
}
文档内容是否对您有帮助?