Collect Remediation Results
Function
This API is used to collect remediation results.
Calling Method
For details, see Calling APIs.
URI
POST /v1/resource-manager/domains/{domain_id}/policy-assignments/{policy_assignment_id}/remediation-execution-statuses/summary
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
domain_id |
Yes |
String |
Specifies tags. Maximum: 36 |
policy_assignment_id |
Yes |
String |
Specifies the rule ID. Maximum: 36 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
limit |
No |
Integer |
Specifies the maximum number of records to return. Minimum: 1 Maximum: 200 Default: 200 |
marker |
No |
String |
Specifies the pagination parameter. Minimum: 4 Maximum: 400 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
resource_keys |
Yes |
Array of RemediationResourceKey objects |
A list of query criteria required to collect remediation results. Array Length: 0 - 100 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
resource_id |
Yes |
String |
Resource ID. Minimum: 1 Maximum: 512 |
resource_provider |
Yes |
String |
Cloud service name, to be compatible with some policyState where the cloud service name is empty in the compliance result, the value can be an empty string. Minimum: 0 Maximum: 128 |
resource_type |
Yes |
String |
Resource type, to be compatible with some policyState where the resource type is empty in the compliance result, the value can be an empty string. Minimum: 0 Maximum: 128 |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
value |
Array of RemediationExecutionStatus objects |
Detailed correction result list. |
page_info |
PageInfo object |
Specifies the pagination object. |
Parameter |
Type |
Description |
---|---|---|
resource_key |
RemediationResourceKey object |
Details about the query criteria for remediation results. |
invocation_time |
String |
The start time of remediation. |
state |
String |
Execution result of remediation. |
message |
String |
Information of remediation execution. |
Parameter |
Type |
Description |
---|---|---|
resource_id |
String |
Resource ID. Minimum: 1 Maximum: 512 |
resource_provider |
String |
Cloud service name, to be compatible with some policyState where the cloud service name is empty in the compliance result, the value can be an empty string. Minimum: 0 Maximum: 128 |
resource_type |
String |
Resource type, to be compatible with some policyState where the resource type is empty in the compliance result, the value can be an empty string. Minimum: 0 Maximum: 128 |
Parameter |
Type |
Description |
---|---|---|
current_count |
Integer |
Specifies the resource quantity on the current page. Minimum: 0 Maximum: 200 |
next_marker |
String |
Specifies the marker value of the next page. Minimum: 4 Maximum: 400 |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Specifies the error code. |
error_msg |
String |
Specifies the error message. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Specifies the error code. |
error_msg |
String |
Specifies the error message. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Specifies the error code. |
error_msg |
String |
Specifies the error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Specifies the error code. |
error_msg |
String |
Specifies the error message. |
Example Requests
Collects remediation results for the specified resource.
POST https://{endpoint}/v1/resource-manager/domains/{domain_id}/policy-assignments/{policy_assignment_id}/remediation-execution-statuses/summary { "resource_keys" : [ { "resource_id" : "resource_id_1", "resource_provider" : "resource_provider_1", "resource_type" : "resource_type_1" }, { "resource_id" : "resource_id_2", "resource_provider" : "resource_provider_2", "resource_type" : "resource_type_2" } ] }
Example Responses
Status code: 200
Operation succeeded.
{ "value" : [ { "resource_key" : { "resource_id" : "resource_id1", "resource_provider" : "resource_provider1", "resource_type" : "resource_type1" }, "invocation_time" : "2024-01-17T09:39:19Z", "state" : "SUCCEEDED", "message" : "Execution success." }, { "resource_key" : { "resource_id" : "resource_id1", "resource_provider" : "resource_provider2", "resource_type" : "resource_type2" }, "invocation_time" : "2024-01-17T09:41:20Z", "state" : "FAILED", "message" : "You do not have the permission to invoke functionGraph." } ], "page_info" : { "current_count" : 2, "next_marker" : null } }
Status Codes
Status Code |
Description |
---|---|
200 |
Operation succeeded. |
400 |
Invalid parameters. |
403 |
Forbidden |
404 |
Resources not found. |
500 |
Internal server error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot