Creates a custom user property.
Operation description
-
You can create up to 10 properties per Alibaba Cloud account. Each property includes a property name (PropertyKey) and multiple property values (PropertyValue).
-
Each property supports up to 50 property values.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecd:CreateProperty |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| PropertyKey |
string |
Yes |
The property name. |
department |
| PropertyValues |
array |
No |
The property values. You can specify up to 50 values. |
|
|
string |
No |
The value of the property. |
HR |
|
| BusinessChannel |
string |
No |
Channel |
ENTERPRISE |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
1CBAFFAB-B697-4049-A9B1-67E1FC5F**** |
| CreateResult |
object |
The property creation result. |
|
| PropertyId |
integer |
The ID of the property. |
390 |
| PropertyKey |
string |
The name of the property. |
department |
| SavePropertyValueModel |
object |
The property value creation result. |
|
| SavePropertyValues |
array<object> |
The property values that were created. |
|
|
object |
The created property value. |
||
| PropertyValueId |
integer |
The ID of the property value. |
978 |
| PropertyValue |
string |
The value of the property. |
HR |
| FailedPropertyValues |
array<object> |
The property values that failed to be created. |
|
|
object |
The property value that failed to be created. |
||
| PropertyId |
integer |
The ID of the property value. |
390 |
| PropertyValue |
string |
The value of the property. |
HR |
| ErrorCode |
string |
The error code. |
ExistedPropertyValue |
| ErrorMessage |
string |
The error message. |
The property value is used by another property. |
Examples
Success response
JSON format
{
"RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
"CreateResult": {
"PropertyId": 390,
"PropertyKey": "department",
"SavePropertyValueModel": {
"SavePropertyValues": [
{
"PropertyValueId": 978,
"PropertyValue": "HR"
}
],
"FailedPropertyValues": [
{
"PropertyId": 390,
"PropertyValue": "HR",
"ErrorCode": "ExistedPropertyValue",
"ErrorMessage": "The property value is used by another property."
}
]
}
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.