Queries the compliance evaluation timeline for a specified resource.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
config:GetResourceComplianceTimeline |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceType |
string |
Yes |
The resource type. |
ACS::ECS::Instance |
| ResourceId |
string |
Yes |
The resource ID. |
i-uf6072y75i2cevjq**** |
| StartTime |
integer |
No |
The start timestamp. The default value is 30 days before the time of the API call. |
1593599340010 |
| EndTime |
integer |
No |
The end timestamp. The default value is the time of the API call. |
1593599342230 |
| Limit |
integer |
No |
The number of entries to return on each page for a paged query. Valid values: 1 to 100. Default value: 10. |
10 |
| MultiAccount |
boolean |
No |
This parameter is scheduled to be deprecated before 00:00:00 on June 30, 2021. The API for the account group feature that replaces this parameter will be available before 00:00:00 on May 30, 2021. If you use this parameter, switch to the account group API after 00:00:00 on May 30, 2021. For more information about account groups, see Account groups. |
true |
| MemberId |
string |
No |
This parameter is scheduled to be deprecated before 00:00:00 on June 30, 2021. The API for the account group feature that replaces this parameter will be available before 00:00:00 on May 30, 2021. If you use this parameter, switch to the account group API after 00:00:00 on May 30, 2021. For more information about account groups, see Account groups. |
123456789 |
| Region |
string |
Yes |
The region ID. |
cn-hangzhou |
| NextToken |
string |
No |
The token that is used to start the next query. |
caeba0bbb2be03f84eb48b699f0a**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
None. |
||
| RequestId |
string |
The request ID. |
DE9FFFE5-FCAD-4B24-9546-BF49273C562B |
| ResourceComplianceTimeline |
object |
The compliance evaluation history of the resource. |
|
| ComplianceList |
array<object> |
A list of compliance evaluation history records for the resource. |
|
|
object |
None. |
||
| AccountId |
string |
The ID of the Alibaba Cloud account. |
120390217529**** |
| AvailabilityZone |
string |
The zone where the resource resides. |
cn-hangzhou-f |
| CaptureTime |
integer |
The timestamp of the compliance evaluation. |
1203902175292305 |
| Configuration |
string |
The list of rules that are associated with the resource and the compliance details of the rules. |
{\"managetest-required-tags\":[{},{\"configRuleId\":\"cr-656d5180a8d1009c****\",\"configRuleArn\":\"acs:config::120390217529****:config-rule/cr-656d5180a8d1009c****\",\"configRuleName\":\"managetest-required-tags\",\"complianceType\":\"NON_COMPLIANT\",\"riskLevel\":1,\"annotation\":\"{\\\"desiredValue\\\":\\\"key1\\\",\\\"reason\\\":\\\"No tag with name key1\\\"}\",\"invokingEventMessageType\":\"ConfigurationItemChangeNotification\"}]} |
| ConfigurationDiff |
string |
The details of the rules whose compliance status has changed. |
{\"Compliance\":{\"complianceType\":\"NON_COMPLIANT\",\"count\":2},\"ConfigRuleList\":[{\"configRuleId\":\"cr-7b6e5180a8d100cc****\",\"configRuleArn\":\"acs:config::120390217529****:config-rule/cr-7b6e5180a8d100cc****\",\"configRuleName\":\"required-tags\",\"complianceType\":\"COMPLIANT\",\"riskLevel\":1,\"invokingEventMessageType\":\"ConfigurationItemChangeNotification\"}]} |
| Region |
string |
The region ID. |
cn-hangzhou |
| ResourceCreateTime |
integer |
The timestamp when the resource was created. |
1203902175293610 |
| ResourceId |
string |
The resource ID. |
i-uf6072y75i2cevjq**** |
| ResourceName |
string |
The resource name. |
test-resource |
| ResourceStatus |
string |
The status of the resource. The resource status is defined by the corresponding Alibaba Cloud service. This parameter can be empty. For example:
|
Running |
| ResourceType |
string |
The resource type. |
ACS::ECS::Instance |
| Tags |
string |
The resource tags. |
{\"project\":[\"efg\"]} |
| Limit |
integer |
The number of entries to return on each page for a paged query. Valid values: 1 to 100. |
10 |
| NextToken |
string |
The token that is used to start the next query. |
caeba0bbb2be03f84eb48b699f0a**** |
| TotalCount |
integer |
The total number of historical compliance evaluation results. |
100 |
Examples
Success response
JSON format
{
"RequestId": "DE9FFFE5-FCAD-4B24-9546-BF49273C562B",
"ResourceComplianceTimeline": {
"ComplianceList": [
{
"AccountId": "120390217529****",
"AvailabilityZone": "cn-hangzhou-f",
"CaptureTime": 1203902175292305,
"Configuration": "{\\\"managetest-required-tags\\\":[{},{\\\"configRuleId\\\":\\\"cr-656d5180a8d1009c****\\\",\\\"configRuleArn\\\":\\\"acs:config::120390217529****:config-rule/cr-656d5180a8d1009c****\\\",\\\"configRuleName\\\":\\\"managetest-required-tags\\\",\\\"complianceType\\\":\\\"NON_COMPLIANT\\\",\\\"riskLevel\\\":1,\\\"annotation\\\":\\\"{\\\\\\\"desiredValue\\\\\\\":\\\\\\\"key1\\\\\\\",\\\\\\\"reason\\\\\\\":\\\\\\\"No tag with name key1\\\\\\\"}\\\",\\\"invokingEventMessageType\\\":\\\"ConfigurationItemChangeNotification\\\"}]}",
"ConfigurationDiff": "{\\\"Compliance\\\":{\\\"complianceType\\\":\\\"NON_COMPLIANT\\\",\\\"count\\\":2},\\\"ConfigRuleList\\\":[{\\\"configRuleId\\\":\\\"cr-7b6e5180a8d100cc****\\\",\\\"configRuleArn\\\":\\\"acs:config::120390217529****:config-rule/cr-7b6e5180a8d100cc****\\\",\\\"configRuleName\\\":\\\"required-tags\\\",\\\"complianceType\\\":\\\"COMPLIANT\\\",\\\"riskLevel\\\":1,\\\"invokingEventMessageType\\\":\\\"ConfigurationItemChangeNotification\\\"}]}",
"Region": "cn-hangzhou",
"ResourceCreateTime": 1203902175293610,
"ResourceId": "i-uf6072y75i2cevjq****",
"ResourceName": "test-resource",
"ResourceStatus": "Running",
"ResourceType": "ACS::ECS::Instance",
"Tags": "{\\\"project\\\":[\\\"efg\\\"]}"
}
],
"Limit": 10,
"NextToken": "caeba0bbb2be03f84eb48b699f0a****",
"TotalCount": 100
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | NoPermission | You are not authorized to perform this operation. | You are not authorized to perform this operation. |
| 404 | AccountNotExisted | Your account does not exist. | |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | The request has failed due to a temporary failure of the server. |
See for a complete list.
Release notes
See Release Notes for a complete list.