Deletes multiple rules at a time.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DeleteConfigRules

The operation that you want to perform. Set the value to DeleteConfigRules.

ConfigRuleIds String Yes cr-2da35180a8d1008e****,cr-2da35180a8d1008e****

The IDs of the rules. Separate multiple rule IDs with commas (,). You can specify a maximum of 20 rule IDs at a time.

Response parameters

Parameter Type Example Description
OperateRuleResult Struct

The result information about the operation.

OperateRuleItemList Array of OperateRuleItem

The result information about each rule.

ConfigRuleId String cr-2da35180a8d1008e****

The ID of the rule.

ErrorCode String ConfigRuleCanNotDelete

The error code.

  • If the rule is deleted, no error code is returned.
  • If you fail to delete the rule, an error code is returned. For more information, visit the API Error Center.
Success Boolean false

Indicates whether the rule is deleted. Valid values:

  • true
  • false
RequestId String 49C1A88F-D163-46DF-84A6-F300229F37AE

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/? Action=DeleteConfigRules
&ConfigRuleIds=cr-2da35180a8d1008e****,cr-2da35180a8d1008e****
&<Common request parameters>

Sample success responses

XML format

<DeleteConfigRulesResponse>
      <OperateRuleResult>
            <OperateRuleItemList>
                  <ConfigRuleId>cr-2da35180a8d1008e****</ConfigRuleId>
                  <ErrorCode>ConfigRuleCanNotDelete</ErrorCode>
                  <Success>false</Success>
            </OperateRuleItemList>
            <OperateRuleItemList>
                  <ConfigRuleId>cr-2da351800131233a****</ConfigRuleId>
                  <ErrorCode></ErrorCode>
                  <Success>true</Success>
            </OperateRuleItemList>
            <RequestId>49C1A88F-D163-46DF-84A6-F300229F37AE</RequestId>
      </OperateRuleResult>
</DeleteConfigRulesResponse>

JSON format

{
    "OperateRuleResult": {
        "OperateRuleItemList": [
            {
                "ConfigRuleId": "cr-2da35180a8d1008e****",
                "ErrorCode": "ConfigRuleCanNotDelete",
                "Success": false
            },
            {
                "ConfigRuleId": "cr-2da351800131233a****",
                "ErrorCode": "",
                "Success": true
            }
        ],
        "RequestId": "49C1A88F-D163-46DF-84A6-F300229F37AE"
    }
}

Error codes

HTTP status code Error code Error message Description
404 AccountNotExisted Your account does not exist. The error message returned because your account does not exist.
503 ServiceUnavailable The request has failed due to a temporary failure of the server. The error message returned because the service is unavailable.
400 NoPermission You are not authorized to perform this operation. The error message returned because you are not authorized to perform the specified operation.
400 ConfigRuleCanNotDelete The config rule cannot be deleted. The error message returned because the specified rule cannot be deleted.
400 Invalid.ConfigRuleIds.SizeExceed The maximum number of ConfigRuleIds cannot exceed 20. The error message returned because you cannot delete more than 20 rules at a time.

For a list of error codes, visit the API Error Center.