Deletes one or more specified rules.
Operation description
In this example, the rule whose ID is cr-9908626622af0035**** is deleted.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
config:DeleteConfigRules |
delete |
*Rule
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ConfigRuleIds |
string |
Yes |
The rule IDs. Separate multiple rule IDs with commas (,). For more information about how to obtain the ID of a rule, see ListConfigRules. |
cr-9908626622af0035**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
6721BBD3-F2A6-5349-9051-EE0111036D3F |
| OperateRuleResult |
object |
The results of the delete operations. |
|
| OperateRuleItemList |
array<object> |
The result of the delete operation. |
|
|
object |
|||
| ErrorCode |
string |
The error code.
|
ConfigRuleCanNotDelete |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
false |
| ConfigRuleId |
string |
The rule ID. |
cr-9908626622af0035**** |
Examples
Success response
JSON format
{
"RequestId": "6721BBD3-F2A6-5349-9051-EE0111036D3F",
"OperateRuleResult": {
"OperateRuleItemList": [
{
"ErrorCode": "ConfigRuleCanNotDelete",
"Success": false,
"ConfigRuleId": "cr-9908626622af0035****"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | NoPermission | You are not authorized to perform this operation. | |
| 400 | ConfigRuleCanNotDelete | The config rule cannot be deleted. | |
| 400 | Invalid.ConfigRuleIds.SizeExceed | The maximum number of ConfigRuleIds cannot exceed 20. | |
| 404 | AccountNotExisted | Your account does not exist. | |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.