ALIYUN::ICE::Category类型用于创建媒资分类。
语法
{
"Type": "ALIYUN::ICE::Category",
"Properties": {
"CateName": String,
"ParentId": Integer,
"Type": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
CateName | String | 是 | 是 | 分类名称。 |
|
ParentId | Integer | 否 | 否 | 父分类 ID。 | 无 |
Type | String | 否 | 否 | 分类类型。 | 取值:
|
返回值
Fn::GetAtt
ParentId:父分类 ID。
Level:分类层级。
CateId:创建的分类 ID。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
CateName:
Type: String
Description:
en: |-
The category name.
The value can be up to 64 bytes in length.
The value must be encoded in UTF-8.
Required: true
Default: test_category
Resources:
Category:
Type: ALIYUN::ICE::Category
Properties:
CateName:
Ref: CateName
Outputs:
ParentId:
Description: The ID of the parent category.
Value:
Fn::GetAtt:
- Category
- ParentId
Level:
Description: The level of the category. The primary classification level is 0, the secondary classification level is 1, and the tertiary classification level is 2.
Value:
Fn::GetAtt:
- Category
- Level
CateId:
Description: The ID of the category.
Value:
Fn::GetAtt:
- Category
- CateId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"CateName": {
"Type": "String",
"Description": {
"en": "The category name.\nThe value can be up to 64 bytes in length.\nThe value must be encoded in UTF-8."
},
"Required": true,
"Default": "test_category"
}
},
"Resources": {
"Category": {
"Type": "ALIYUN::ICE::Category",
"Properties": {
"CateName": {
"Ref": "CateName"
}
}
}
},
"Outputs": {
"ParentId": {
"Description": "The ID of the parent category.",
"Value": {
"Fn::GetAtt": [
"Category",
"ParentId"
]
}
},
"Level": {
"Description": "The level of the category. The primary classification level is 0, the secondary classification level is 1, and the tertiary classification level is 2.",
"Value": {
"Fn::GetAtt": [
"Category",
"Level"
]
}
},
"CateId": {
"Description": "The ID of the category.",
"Value": {
"Fn::GetAtt": [
"Category",
"CateId"
]
}
}
}
}
该文章对您有帮助吗?