Customization and validation of check items and repair parameters
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| yundun-sas:VerityCheckCustomConfig | get | *All Resources * |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| CheckId | long | No | Check item ID. | 76 |
| CustomConfigs | array<object> | No | List of custom configuration items for the check item. | |
| object | No | List of custom configuration items for the check item. | ||
| Name | string | No | Name of the custom configuration item for the check item, unique within the same check item. | IPList |
| Value | string | No | User-configured value string for the custom configuration item of the check item. | 10.12.4.XX |
| Operation | string | No | Operation type for the custom configuration item of the check item. Only pass DELETE when deleting; no need to pass for creation or update. | DELETE |
| RepairConfigs | array<object> | No | Repair parameters supported by the check item's repair function. | |
| object | No | Repair parameters supported by the check item's repair function. | ||
| Name | string | No | Name of the repair parameter for the check item, unique within the same check item. | IPLists |
| Value | string | No | User-configured value string for the repair parameter of the check item. | 172.26.49.XX |
| FlowId | string | No | ID of the repair process during the repair. | 7fec0a3395b345c18f108ffc9fc0**** |
| Operation | string | No | Operation type for the custom configuration item of the check item. Only pass DELETE when deleting; no need to pass for creation or update. | DELETE |
| Type | string | No | Situation Awareness parameter validation types:
| REPAIR_CONFIG |
| CustomCheckConfig | object | No | Custom check item to validate input parameters. | |
| Vendor | string | No | Cloud asset vendor. Values:
| ALIYUN |
| InstanceType | string | No | Asset types of cloud products. Values:
| ECS |
| InstanceSubType | string | No | Asset subtype of the cloud product | DISK |
| CheckRule | string | No | Define rules for custom inspection items. | {"AssociatedData":{"ToDataList":[{"DataName":"ACS_ECS_Instance","PropertyPath":"InstanceId","FromPropertyPath":"InstanceId"}]},"MatchProperty":{"Operator":"AND","MatchProperties":[{"DataName":"ACS_ECS_Disk","PropertyPath":"DiskId","MatchOperator":"EQ","MatchPropertyValue":"testId"}]}} |
| CloudAssetInstance | object | No | Asset instance that requires testing rules | |
| InstanceId | string | No | Instance ID of the asset. | i-0jl4mjgl261cfrz5**** |
| RegionId | string | No | The region ID of the instance. | ap-southeast-1 |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "7532B7EE-7CE7-5F4D-BF04-B12447DD****",
"ErrorCheckConfigs": [
{
"Name": "IpList",
"Value": "10.12.4.XX",
"Type": "custom",
"ErrorCode": "ConfigEqualIllegal",
"ErrorMsg": "Custom parameter is not equal to corresponding check parameter",
"LinkErrorConfigs": [
{
"Name": "IpLists",
"ShowName": "IP Lists",
"Type": "repair"
}
]
}
],
"ErrorRepairConfigs": [
{
"Name": "IpLists",
"Value": "172.26.49.XX\n",
"Type": "repair",
"ErrorCode": "ConfigEqualIllegal",
"ErrorMsg": "Repair parameter is not equal to corresponding check parameter",
"LinkErrorConfigs": [
{
"Name": "IpList",
"ShowName": "Ip List",
"Type": "custom"
}
]
}
],
"ErrorCheckCustomConfig": {
"ErrorCode": "CspmVerifyCheckCustomItemNoPass",
"ErrorMsg": "Creation verification failed."
}
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | ParamIllegal.%s | The parameter %s is invalid, please fill it in again. | Invalid parameter, please fill in again |
| 400 | NoPurchase | The user did not purchase this product. | User has not purchased this product |
| 400 | CspmVerifyItemRuleError.%s | Audit check item check rule error: %s. | The format of the check item rule does not pass. For details, see the return error code. |
| 403 | NoPermission | caller has no permission | You are not authorized to do this operation. |
| 500 | ServerError | ServerError | - |
For a list of error codes, visit the Service error codes.
