ALIYUN::ICE::Category

ALIYUN::ICE::Category类型用于创建媒资分类。

语法

{
  "Type": "ALIYUN::ICE::Category",
  "Properties": {
    "CateName": String,
    "ParentId": Integer,
    "Type": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

CateName

String

分类名称。

  • 最多支持 64 个字节。

  • UTF-8 编码。

ParentId

Integer

父分类 ID。

Type

String

分类类型。

取值:

  • default(默认值):音视频/图片分类。

  • material:短视频素材分类。

返回值

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"
        ]
      }
    }
  }
}