Cloud Config can send resource non-compliance events to Simple Message Queue (formerly MNS).
Content example
In this example, a non-compliance event is generated for the ECS instance test_Instance in the China (Beijing) region. This event is delivered to Simple Message Queue (formerly MNS). The instance belongs to the Alibaba Cloud account 120886317861**** in single-account mode.
{
"annotation": "{\"configuration\":\"classic\",\"desiredValue\":\"vpc\",\"operator\":\"StringEquals\",\"property\":\"$.InstanceNetworkType\"}",
"riskLevel": "Warning",
"dataType": "NonCompliantNotification",
"evaluationResultIdentifier": {
"orderingTimestamp": 1630907917476,
"evaluationResultQualifier": {
"resourceId": "i-2ze1qff61suafi71****",
"configRuleName": "ECS instances must use VPCs",
"configRuleId": "cr-b9046457e0d9003f****",
"captureTime": 1630907917476,
"resourceName": "test_Instance",
"configRuleArn": "acs:config::120886317861****:rule/cr-b9046457e0d9003f****",
"regionId": "cn-beijing",
"resourceOwnerId": 120886317861****,
"resourceType": "ACS::ECS::Instance"
}
},
"eventType": "ResourceCompliance",
"invokingEventMessageType": "Manual",
"complianceType": "NON_COMPLIANT",
"accountId": 120886317861****,
"requestId": "a13f5505-427d-41ef-ab2e-606394abb9a8",
"eventName": "NonCompliant",
"notificationCreationTime": 1630907919929
}
Parameters
The following table describes the main parameters in a resource non-compliance event delivered to Simple Message Queue (formerly MNS).
|
Parameter |
Description |
|
annotation |
Details about why the resource is non-compliant. |
|
riskLevel |
The risk level of the rule. Valid values:
|
|
dataType |
The type of content delivered to Simple Message Queue (formerly MNS). Valid values:
|
|
evaluationResultIdentifier |
The resource compliance evaluation details, including the evaluation time and related information. |
|
orderingTimestamp |
The timestamp of the resource compliance evaluation. |
|
evaluationResultQualifier |
The resource compliance evaluation qualifier, including the resource ID, resource name, resource type, rule name, and rule ID. |
|
eventType |
The event type. Valid values:
|
|
invokingEventMessageType |
The trigger mechanism of the rule. Valid values:
|
|
complianceType |
The compliance type. The value is |
|
accountId |
The ID of the account to which the resource belongs. Cloud Config supports the following types of accounts:
|
|
eventName |
The event name. The value |
|
notificationCreationTime |
The timestamp when the notification was created. |