Removes one or more rules in an account group from a compliance package.
Prerequisites
One or more rules in an account group are added to a compliance package.
Usage notes
The sample request in this topic shows you how to remove the cr-6cc4626622af00e7****
rule in the ca-75b4626622af00c3****
account group from the cp-5bb1626622af00bd****
compliance package.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DetachAggregateConfigRuleToCompliancePack |
The operation that you want to perform. Set the value to DetachAggregateConfigRuleToCompliancePack. |
ConfigRuleIds | String | Yes | cr-a124626622af00e7**** |
The ID of the rule to be removed from the compliance package. Separate multiple rule IDs with commas (,). For more information about how to obtain the ID of a rule, see ListAggregateConfigRules. |
CompliancePackId | String | Yes | cp-5bb1626622af00bd**** |
The ID of the compliance package from which you want to remove the rule. For more information about how to obtain the ID of a compliance package, see ListAggregateCompliancePacks. |
AggregatorId | String | Yes | ca-75b4626622af00c3**** |
The ID of the account group. For more information about how to obtain the ID of an account group, see ListAggregators. |
For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 6EC7AED1-172F-42AE-9C12-295BC2ADB12A |
The ID of the request. |
OperateRuleResult | Object |
The results of the operations to remove one or more rules. |
|
OperateRuleItemList | Array of OperateRuleItem |
The result of the operation to remove the rule. |
|
ErrorCode | String | ConfigRuleNotExists |
The error code.
|
Success | Boolean | true |
Indicates whether the operation is successful. Valid values:
|
ConfigRuleId | String | cr-a124626622af00e7**** |
The ID of the rule that is removed from the compliance package. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DetachAggregateConfigRuleToCompliancePack
&ConfigRuleIds=cr-a124626622af00e7****
&CompliancePackId=cp-5bb1626622af00bd****
&AggregatorId=ca-75b4626622af00c3****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DetachAggregateConfigRuleToCompliancePackResponse>
<RequestId>6EC7AED1-172F-42AE-9C12-295BC2ADB12A</RequestId>
<OperateRuleResult>
<OperateRuleItemList>
<ErrorCode/>
<Success>true</Success>
<ConfigRuleId>cr-a124626622af00e7****</ConfigRuleId>
</OperateRuleItemList>
</OperateRuleResult>
</DetachAggregateConfigRuleToCompliancePackResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "6EC7AED1-172F-42AE-9C12-295BC2ADB12A",
"OperateRuleResult" : {
"OperateRuleItemList" : [ {
"ErrorCode" : "",
"Success" : true,
"ConfigRuleId" : "cr-a124626622af00e7****"
} ]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
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 | Invalid.ConfigRuleIds.SizeExceed | The maximum number of ConfigRuleIds cannot exceed 20. | The error message returned because the number of specified rule IDs exceeds 20. |
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. |
For a list of error codes, visit the API Error Center.