Cria uma biblioteca de imagens personalizada para moderação de conteúdo.
Sintaxe
{
"Type": "ALIYUN::Aligreen::ImageLib",
"Properties": {
"Category": String,
"ImageLibName": String,
"Scene": String,
"BizTypes": List,
"Enable": Boolean
}
}
Propriedades
|
Propriedade |
Tipo |
Obrigatória |
Editável |
Descrição |
Restrição |
|
Category |
String |
Sim |
Não |
Categoria da biblioteca de imagens. |
Valores válidos:
|
|
ImageLibName |
String |
Sim |
Sim |
Nome da biblioteca de imagens. |
Nenhuma. |
|
Scene |
String |
Sim |
Não |
Cenário de moderação de conteúdo ao qual a biblioteca de imagens se aplica. |
Valores válidos:
|
|
BizTypes |
List |
Não |
Sim |
Cenários de negócios. |
Para obter mais informações, consulte CreateBizType. Especifique até três cenários de negócios. |
|
Enable |
Boolean |
Não |
Sim |
Define se a biblioteca de imagens está ativada. |
Valores válidos:
|
Valores de retorno
Fn::GetAtt
Category: categoria da biblioteca de imagens.
BizTypes: cenários de negócios.
ImageLibId: ID da biblioteca de imagens.
Enable: indica se a biblioteca de imagens está ativada.
Scene: cenário de moderação de conteúdo ao qual a biblioteca de imagens se aplica.
ImageLibName: nome da biblioteca de imagens.
Exemplos
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
Category:
Type: String
Description:
en: 'The category of the image library. Valid values: BLACK: a blacklist, WHITE: a whitelist, REVIEW: a review list.'
AllowedValues:
- BLACK
- WHITE
- REVIEW
Required: true
BizTypes:
AssociationPropertyMetadata:
Parameter:
Type: String
Description:
en: The type of the Biz.
AllowedValues:
- bizTypeA
- bizTypeB
- bizTypeC
Required: false
AssociationProperty: List[Parameter]
Type: Json
Description:
en: 'List of business scenarios. For example: ["bizTypeA", "bizTypeB", "bizTypeC"].'
Required: false
MinLength: 1
MaxLength: 3
Scene:
Type: String
Description:
en: 'The moderation scenario to which the custom image library applies. Valid values: PORN: pornography detection, AD: ad detection, ILLEGAL: terrorist content detection.'
AllowedValues:
- PORN
- AD
- ILLEGAL
Required: true
ImageLibName:
Type: String
Description:
en: The name of the image 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::ImageLib
Properties:
Category:
Ref: Category
BizTypes:
Ref: BizTypes
Scene:
Ref: Scene
ImageLibName:
Ref: ImageLibName
Outputs:
Category:
Description: The category of the image library.
Value:
Fn::GetAtt:
- ExtensionResource
- Category
BizTypes:
Description: List of business scenarios.
Value:
Fn::GetAtt:
- ExtensionResource
- BizTypes
ImageLibId:
Description: The ID of the primary key of the image library.
Value:
Fn::GetAtt:
- ExtensionResource
- ImageLibId
Enable:
Description: Specifies whether to enable the image library.
Value:
Fn::GetAtt:
- ExtensionResource
- Enable
Scene:
Description: The moderation scenario to which the custom image library applies.
Value:
Fn::GetAtt:
- ExtensionResource
- Scene
ImageLibName:
Description: The name of the image library defined by the customer.
Value:
Fn::GetAtt:
- ExtensionResource
- ImageLibName
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Category": {
"Type": "String",
"Description": {
"en": "The category of the image library. Valid values: BLACK: a blacklist, WHITE: a whitelist, REVIEW: a review list."
},
"AllowedValues": [
"BLACK",
"WHITE",
"REVIEW"
],
"Required": true
},
"BizTypes": {
"AssociationPropertyMetadata": {
"Parameter": {
"Type": "String",
"Description": {
"en": "The type of the Biz."
},
"AllowedValues": [
"bizTypeA",
"bizTypeB",
"bizTypeC"
],
"Required": false
}
},
"AssociationProperty": "List[Parameter]",
"Type": "Json",
"Description": {
"en": "List of business scenarios. For example: [\"bizTypeA\", \"bizTypeB\", \"bizTypeC\"]."
},
"Required": false,
"MinLength": 1,
"MaxLength": 3
},
"Scene": {
"Type": "String",
"Description": {
"en": "The moderation scenario to which the custom image library applies. Valid values: PORN: pornography detection, AD: ad detection, ILLEGAL: terrorist content detection."
},
"AllowedValues": [
"PORN",
"AD",
"ILLEGAL"
],
"Required": true
},
"ImageLibName": {
"Type": "String",
"Description": {
"en": "The name of the image 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::ImageLib",
"Properties": {
"Category": {
"Ref": "Category"
},
"BizTypes": {
"Ref": "BizTypes"
},
"Scene": {
"Ref": "Scene"
},
"ImageLibName": {
"Ref": "ImageLibName"
}
}
}
},
"Outputs": {
"Category": {
"Description": "The category of the image library.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Category"
]
}
},
"BizTypes": {
"Description": "List of business scenarios.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"BizTypes"
]
}
},
"ImageLibId": {
"Description": "The ID of the primary key of the image library.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ImageLibId"
]
}
},
"Enable": {
"Description": "Specifies whether to enable the image library.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Enable"
]
}
},
"Scene": {
"Description": "The moderation scenario to which the custom image library applies.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Scene"
]
}
},
"ImageLibName": {
"Description": "The name of the image library defined by the customer.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ImageLibName"
]
}
}
}
}