CreateContextModel
Creates a semantic model.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
log:CreateContextModel |
create |
*ContextModel
|
None | None |
Request syntax
POST /context-models HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. A JSON object that describes the context model to be created, including the model identifier, display name, description, and referenced sources. |
|
| description |
string |
No |
The model description, which is used for explanatory text. For short titles displayed in the UI, use |
End-to-end coverage from order creation to payment |
| displayName |
string |
No |
The display name, which serves as a short title for UI display. It can contain Chinese characters, spaces, and punctuation marks, with a maximum length of 256 characters (counted by characters, not bytes). If this parameter is not specified or is left empty, it indicates that the display name is not set. In this case, the API returns an empty string |
Order analysis model |
| name |
string |
Yes |
The identifier of the context model. It supports only uppercase and lowercase letters, digits, underscores (_), and hyphens (-), and cannot exceed 64 characters in length. It must be unique within the same Alibaba Cloud account and cannot be modified after creation. All other context model API operations use this name to locate the resource. |
orders |
| sources |
object |
No |
The referenced sources. The key is the project name (so the same project does not appear repeatedly), and the value is an array of selected Logstore names under the project. |
{"cn-hangzhou-app-logs": ["*"], "cn-hangzhou-order-logs": ["accesslog", "errorlog"]} |
|
array |
No |
The list of selected Logstore names under the project, which must be a non-empty array. |
||
|
string |
No |
The name of the Logstore under the project. The Logstore must exist, and its parent project must belong to the current account. Wildcards and prefix matching are not supported. Names containing an asterisk (*) are rejected. |
order-log |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| status |
string |
The call result status. If the creation is successful, |
success |
Examples
Success response
JSON format
{
"status": "success"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.