ALIYUN::PAIPlugin::Group类型用于创建人群。
语法
{
"Type": "ALIYUN::PAIPlugin::Group",
"Properties": {
"Name": String,
"Source": Integer,
"Algorithm": String,
"Column": String,
"Filter": String,
"InferenceJobId": String,
"Project": String,
"PhoneNumber": String,
"Remark": String,
"Table": String,
"Text": String,
"Uri": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Name | String | 是 | 否 | 人群名称。 | 无 |
Source | Integer | 是 | 否 | 人群来源。 | 取值:
|
Algorithm | String | 否 | 否 | 关联算法。 | 人群来源为算法时需指定。 |
Column | String | 否 | 否 | 手机号列名。 | 人群来源为 CSV 文件,MaxCompute,并且包含手机号时需指定。 |
Filter | String | 否 | 否 | 过滤条件。 | 人群来源为 MaxCompute 时可指定。 |
InferenceJobId | String | 否 | 否 | 预测任务 ID。 | 人群来源为算法。 |
Project | String | 否 | 否 | MaxCompute(ODPS)项目名。 | 人群来源为 MaxCompute 时需指定。 |
PhoneNumber | String | 否 | 否 | 是否包含手机号。 | 包含手机号的人群可用于触达计划。 |
Remark | String | 否 | 否 | 人群备注。 | 无 |
Table | String | 否 | 否 | MaxCompute(ODPS)表名。 | 人群来源为 MaxCompute 时需指定。 |
Text | String | 否 | 否 | 文本。 | 人群来源为文本时需指定。 |
Uri | String | 否 | 否 | 文件地址。 | 人群来源为文本文件,CSV 文件时需指定。 |
返回值
Fn::GetAtt
CreatedTime:创建时间 (UTC+8)。
Amount:人群数量。
Id:人群 Id。
Name:人群名称。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
PhoneNumber:
Type: String
Description:
en: Whether to include mobile phone numbers. People with mobile phone numbers can be used for reach plans.
Required: false
Text:
Type: String
Description:
en: The text of the phone number. This must be specified when Source is 0(Enter phone numbers).
Required: false
Source:
Type: Number
Description:
en: |-
Crowd source. Valid values:
0: Enter phone numbers.
1: Single-column CSV File (Phone Numbers).
2: Multi-column CSV File.
3: MaxCompute Table.
4: Algorithm.
AllowedValues:
- 0
- 1
- 2
- 3
- 4
Required: true
Name:
Type: String
Description:
en: The name of the user group.
Required: true
Resources:
ExtensionResource:
Type: ALIYUN::PAIPlugin::Group
Properties:
PhoneNumber:
Ref: PhoneNumber
Text:
Ref: Text
Source:
Ref: Source
Name:
Ref: Name
Outputs:
CreatedTime:
Description: The creation time of the user group.
Value:
Fn::GetAtt:
- ExtensionResource
- CreatedTime
Amount:
Description: The number of the user group.
Value:
Fn::GetAtt:
- ExtensionResource
- Amount
Id:
Description: The ID of the user group.
Value:
Fn::GetAtt:
- ExtensionResource
- Id
Name:
Description: The name of the user group.
Value:
Fn::GetAtt:
- ExtensionResource
- Name
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"PhoneNumber": {
"Type": "String",
"Description": {
"en": "Whether to include mobile phone numbers. People with mobile phone numbers can be used for reach plans."
},
"Required": false
},
"Text": {
"Type": "String",
"Description": {
"en": "The text of the phone number. This must be specified when Source is 0(Enter phone numbers)."
},
"Required": false
},
"Source": {
"Type": "Number",
"Description": {
"en": "Crowd source. Valid values:\n0: Enter phone numbers.\n1: Single-column CSV File (Phone Numbers).\n2: Multi-column CSV File.\n3: MaxCompute Table.\n4: Algorithm."
},
"AllowedValues": [
0,
1,
2,
3,
4
],
"Required": true
},
"Name": {
"Type": "String",
"Description": {
"en": "The name of the user group."
},
"Required": true
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::PAIPlugin::Group",
"Properties": {
"PhoneNumber": {
"Ref": "PhoneNumber"
},
"Text": {
"Ref": "Text"
},
"Source": {
"Ref": "Source"
},
"Name": {
"Ref": "Name"
}
}
}
},
"Outputs": {
"CreatedTime": {
"Description": "The creation time of the user group.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"CreatedTime"
]
}
},
"Amount": {
"Description": "The number of the user group.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Amount"
]
}
},
"Id": {
"Description": "The ID of the user group.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Id"
]
}
},
"Name": {
"Description": "The name of the user group.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Name"
]
}
}
}
}