ALIYUN::ServiceCatalog::Constraint类型用于创建约束。
语法
{
"Type": "ALIYUN::ServiceCatalog::Constraint",
"Properties": {
"Config": Map,
"ConstraintType": String,
"PortfolioId": String,
"ProductId": String,
"Description": String
}
}
属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
Config |
Map |
是 |
是 |
约束配置。 |
格式:
|
|
ConstraintType |
String |
是 |
否 |
约束类型。 |
取值为 Launch,表示启动约束。 |
|
PortfolioId |
String |
是 |
否 |
约束所属的产品组合 ID。 |
无 |
|
ProductId |
String |
是 |
否 |
约束对应的产品 ID。 |
无 |
|
Description |
String |
否 |
是 |
约束描述。 |
长度为 1~128 个字符。 |
返回值
Fn::GetAtt
ConstraintId:约束 ID。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
Config:
Type: Json
Description:
en: The configuration of the constraint.
Required: true
PortfolioId:
Type: String
Description:
en: The ID of the portfolio.
Required: true
ConstraintType:
Type: String
Description:
en: The type of the constraint.
Required: true
ProductId:
Type: String
Description:
en: The ID of the product.
Required: true
Resources:
Constraint:
Type: ALIYUN::ServiceCatalog::Constraint
Properties:
Config:
Ref: Config
PortfolioId:
Ref: PortfolioId
ConstraintType:
Ref: ConstraintType
ProductId:
Ref: ProductId
Outputs:
ConstraintId:
Description: The ID of the constraint.
Value:
Fn::GetAtt:
- Constraint
- ConstraintId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Config": {
"Type": "Json",
"Description": {
"en": "The configuration of the constraint."
},
"Required": true
},
"PortfolioId": {
"Type": "String",
"Description": {
"en": "The ID of the portfolio."
},
"Required": true
},
"ConstraintType": {
"Type": "String",
"Description": {
"en": "The type of the constraint."
},
"Required": true
},
"ProductId": {
"Type": "String",
"Description": {
"en": "The ID of the product."
},
"Required": true
}
},
"Resources": {
"Constraint": {
"Type": "ALIYUN::ServiceCatalog::Constraint",
"Properties": {
"Config": {
"Ref": "Config"
},
"PortfolioId": {
"Ref": "PortfolioId"
},
"ConstraintType": {
"Ref": "ConstraintType"
},
"ProductId": {
"Ref": "ProductId"
}
}
}
},
"Outputs": {
"ConstraintId": {
"Description": "The ID of the constraint.",
"Value": {
"Fn::GetAtt": [
"Constraint",
"ConstraintId"
]
}
}
}
}该文章对您有帮助吗?