ALIYUN::Aligreen::KeywordLib类型用于创建文本库。
语法
{
"Type": "ALIYUN::Aligreen::KeywordLib",
"Properties": {
"KeywordLibName": String,
"ResourceType": String,
"BizTypes": List,
"Category": String,
"Enable": Boolean,
"Language": String,
"LibType": String,
"MatchMode": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
KeywordLibName | String | 是 | 是 | 文本库名称。 | 无 |
ResourceType | String | 是 | 否 | 文本库应用的检测场景类型。 | 取值:
|
BizTypes | List | 否 | 是 | 业务场景列表。 | 更多信息,请参见创建业务场景。 |
Category | String | 否 | 否 | 文本库类型。 | 取值:
|
Enable | Boolean | 否 | 是 | 是否启用文本库。 | 取值:
|
Language | String | 否 | 否 | 文本库使用的语言。 | 取值:
|
LibType | String | 否 | 否 | 各应用场景中的文本库类型。 | 取值:
|
MatchMode | String | 否 | 否 | 匹配方式。 | 取值:
|
返回值
Fn::GetAtt
MatchMode:匹配方式。
Category:文本库类型。
Language:文本库使用的语言。
BizTypes:业务场景列表。
Enable:是否启用文本库。
ResourceType:文本库应用的检测场景类型。
LibType:各应用场景中的文本库类型。
KeywordLibId:文本库ID。
KeywordLibName:文本库名称。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ResourceType:
Type: String
Description:
en: 'The moderation scenario to which the text library applies. Valid values:TEXT: text anti-spam、IMAGE: ad violation detection、VOICE: audio anti-spam.'
AllowedValues:
- TEXT
- IMAGE
- VOICE
Required: true
KeywordLibName:
Type: String
Description:
en: The name of the keyword library defined by the customer. It can contain no more than 20 characters in Chinese, English, and underscore (_).
Required: true
Resources:
ExtensionResource:
Type: ALIYUN::Aligreen::KeywordLib
Properties:
ResourceType:
Ref: ResourceType
KeywordLibName:
Ref: KeywordLibName
Outputs:
MatchMode:
Description: The matching method.
Value:
Fn::GetAtt:
- ExtensionResource
- MatchMode
Category:
Description: The category of the text library.
Value:
Fn::GetAtt:
- ExtensionResource
- Category
Language:
Description: Language used by the text Library.
Value:
Fn::GetAtt:
- ExtensionResource
- Language
BizTypes:
Description: The business scenario.
Value:
Fn::GetAtt:
- ExtensionResource
- BizTypes
Enable:
Description: Specifies whether to enable text library.
Value:
Fn::GetAtt:
- ExtensionResource
- Enable
ResourceType:
Description: The moderation scenario to which the text library applies.
Value:
Fn::GetAtt:
- ExtensionResource
- ResourceType
LibType:
Description: The category of the text library in each moderation scenario.
Value:
Fn::GetAtt:
- ExtensionResource
- LibType
KeywordLibId:
Description: The ID of the primary key of the keyword library.
Value:
Fn::GetAtt:
- ExtensionResource
- KeywordLibId
KeywordLibName:
Description: The name of the keyword library defined by the customer.
Value:
Fn::GetAtt:
- ExtensionResource
- KeywordLibName
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ResourceType": {
"Type": "String",
"Description": {
"en": "The moderation scenario to which the text library applies. Valid values:TEXT: text anti-spam、IMAGE: ad violation detection、VOICE: audio anti-spam."
},
"AllowedValues": [
"TEXT",
"IMAGE",
"VOICE"
],
"Required": true
},
"KeywordLibName": {
"Type": "String",
"Description": {
"en": "The name of the keyword library defined by the customer. It can contain no more than 20 characters in Chinese, English, and underscore (_)."
},
"Required": true
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::Aligreen::KeywordLib",
"Properties": {
"ResourceType": {
"Ref": "ResourceType"
},
"KeywordLibName": {
"Ref": "KeywordLibName"
}
}
}
},
"Outputs": {
"MatchMode": {
"Description": "The matching method.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"MatchMode"
]
}
},
"Category": {
"Description": "The category of the text library.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Category"
]
}
},
"Language": {
"Description": "Language used by the text Library.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Language"
]
}
},
"BizTypes": {
"Description": "The business scenario.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"BizTypes"
]
}
},
"Enable": {
"Description": "Specifies whether to enable text library.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Enable"
]
}
},
"ResourceType": {
"Description": "The moderation scenario to which the text library applies.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ResourceType"
]
}
},
"LibType": {
"Description": "The category of the text library in each moderation scenario.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"LibType"
]
}
},
"KeywordLibId": {
"Description": "The ID of the primary key of the keyword library.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"KeywordLibId"
]
}
},
"KeywordLibName": {
"Description": "The name of the keyword library defined by the customer.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"KeywordLibName"
]
}
}
}
}
该文章对您有帮助吗?