GetAggregateResourceConfigurationTimeline

Updated at:

Queries the configuration history of a specified resource in a specified account group. Cloud Config records every configuration change and resource relationship change of a resource and organizes them into a configuration history. After you activate Cloud Config, it starts recording the configuration history and resource relationship change history of resources, and retains the records for 10 years by default.

Operation description

Cloud Config provides the configuration history of each resource within the monitoring scope. The details are as follows:

  • For resources that exist when you activate Cloud Config, the starting point of the configuration history is the activation time.

  • For resources created after you activate Cloud Config, the starting point of the configuration history is the creation time. Cloud Config records resource configuration changes every 10 minutes. When a resource configuration changes, a node appears in the configuration history, showing the resource configuration details, change details, and the operation events involved in the change at that time.

This topic provides an example on how to query the configuration history of the new-bucket resource (bucket) in the cn-hangzhou region of the member accounts 100931896542**** within the account group ca-5885626622af0008****. The response indicates that the configuration change time of the resource is 1624961112000 (UTC+8: 2021-06-29 18:05:12).

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

config:GetAggregateResourceConfigurationTimeline

list

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ResourceId

string

Yes

The resource ID.

For more information about how to obtain the resource ID, see ListAggregateDiscoveredResources.

new-bucket

StartTime

integer

No

The start timestamp. By default, the system queries the data from 30 days before the call is initiated. Unit: milliseconds.

1623211156000

EndTime

integer

No

The end timestamp. By default, the system queries the data up to the time when the call is initiated. Unit: milliseconds.

1625821156000

MaxResults

integer

No

The maximum number of entries to return for a single request. Valid values: 1 to 100.

10

ResourceType

string

Yes

The resource type.

For more information about how to obtain the resource type, see ListAggregateDiscoveredResources.

ACS::OSS::Bucket

Region

string

Yes

The region ID of the resource ownership.

For more information about how to obtain the region ID of the resource ownership, see ListAggregateDiscoveredResources.

cn-hangzhou

AggregatorId

string

Yes

The account group ID.

For more information about how to obtain the account group ID, see ListAggregators.

ca-5885626622af0008****

NextToken

string

No

The next token to use when the response of a request is truncated. You can use NextToken to initiate another request to retrieve the remaining entries.

IWBjqMYSy0is7zSMGu16****

ResourceAccountId

integer

No

Required. The Alibaba Cloud account ID of the resource to be queried in the account group.

100931896542****

For more information about common request parameters, see Common parameters.

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

ED9CD1B3-286C-4E05-A765-5E1E0B9BC2AB

ResourceConfigurationTimeline

object

The configuration history of the resource.

NextToken

string

The token used to query the next page.

IWBjqMYSy0is7zSMGu16****

MaxResults

integer

The maximum number of entries returned for a single request.

10

ConfigurationList

array<object>

The configuration history list of the resource.

object

None.

Tags

string

The tags of the resource.

{\"\"hc\"\":[\"\"value2\"\"]}

AccountId

integer

The Alibaba Cloud account ID of the resource ownership.

100931896542****

ResourceEventType

string

The type of the resource change event. Valid values:

  • DISCOVERED: The resource event newly discovered by Cloud Config.

  • DISCOVERED_REVISED: The resource event newly discovered by Cloud Config and generated by a periodic correction task.

  • MODIFY: The resource modification event.

  • MODIFY_REVISED: The resource modification event generated by a periodic correction task.

  • REMOVE: The resource deletion event.

Note
  • To ensure resource integrity, Cloud Config periodically aligns data through periodic correction tasks and generates newly discovered resource events. These events occur at a low frequency.

  • The time when a resource event is generated by a periodic correction task is the task discovery time, which is later than the actual change time of the resource.

DISCOVERED

AvailabilityZone

string

The zone.

cn-hangzhou-h

ResourceType

string

The resource type.

ACS::OSS::Bucket

ResourceCreateTime

string

The timestamp when the resource was created. Unit: milliseconds.

1624961112000

Region

string

The region ID.

cn-hangzhou

CaptureTime

string

The timestamp when the resource change snapshot was recorded. Unit: milliseconds.

1624961156000

ConfigurationDiff

string

The details of the resource change that triggered the current evaluation.

{\"AccessControlList\":[null,{\"Grant\":\"private\"}],\"ServerSideEncryptionRule\":[null,{\"SSEAlgorithm\":\"None\"}],\"CreationDate\":[null,\"2021-06-29T10:05:12.000Z\"],\"Owner\":[null,{\"DisplayName\":\"100931896542****\",\"ID\":\"100931896542****\"}],\"BucketPolicy\":[null,{\"LogPrefix\":\"\",\"LogBucket\":\"\"}],\"StorageClass\":[null,\"Standard\"],\"ExtranetEndpoint\":[null,\"oss-cn-hangzhou.aliyuncs.com\"],\"DataRedundancyType\":[null,\"LRS\"],\"AllowEmptyReferer\":[null,\"true\"],\"IntranetEndpoint\":[null,\"oss-cn-hangzhou-internal.aliyuncs.com\"],\"Name\":[null,\"new-bucket\"],\"Location\":[null,\"oss-cn-hangzhou\"]}

ResourceId

string

The resource ID.

new-bucket

ResourceName

string

The resource name.

new-bucket

Examples

Success response

JSON format

{
  "RequestId": "ED9CD1B3-286C-4E05-A765-5E1E0B9BC2AB",
  "ResourceConfigurationTimeline": {
    "NextToken": "IWBjqMYSy0is7zSMGu16****",
    "MaxResults": 10,
    "ConfigurationList": [
      {
        "Tags": "{\\\"\\\"hc\\\"\\\":[\\\"\\\"value2\\\"\\\"]}",
        "AccountId": 0,
        "ResourceEventType": "DISCOVERED",
        "AvailabilityZone": "cn-hangzhou-h",
        "ResourceType": "ACS::OSS::Bucket",
        "ResourceCreateTime": "1624961112000",
        "Region": "cn-hangzhou",
        "CaptureTime": "1624961156000",
        "ConfigurationDiff": "{\\\"AccessControlList\\\":[null,{\\\"Grant\\\":\\\"private\\\"}],\\\"ServerSideEncryptionRule\\\":[null,{\\\"SSEAlgorithm\\\":\\\"None\\\"}],\\\"CreationDate\\\":[null,\\\"2021-06-29T10:05:12.000Z\\\"],\\\"Owner\\\":[null,{\\\"DisplayName\\\":\\\"100931896542****\\\",\\\"ID\\\":\\\"100931896542****\\\"}],\\\"BucketPolicy\\\":[null,{\\\"LogPrefix\\\":\\\"\\\",\\\"LogBucket\\\":\\\"\\\"}],\\\"StorageClass\\\":[null,\\\"Standard\\\"],\\\"ExtranetEndpoint\\\":[null,\\\"oss-cn-hangzhou.aliyuncs.com\\\"],\\\"DataRedundancyType\\\":[null,\\\"LRS\\\"],\\\"AllowEmptyReferer\\\":[null,\\\"true\\\"],\\\"IntranetEndpoint\\\":[null,\\\"oss-cn-hangzhou-internal.aliyuncs.com\\\"],\\\"Name\\\":[null,\\\"new-bucket\\\"],\\\"Location\\\":[null,\\\"oss-cn-hangzhou\\\"]}",
        "ResourceId": "new-bucket",
        "ResourceName": "new-bucket"
      }
    ]
  }
}

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.
400 Invalid.AggregatorId.Value The specified AggregatorId is invalid. The specified aggregator ID does not exist or you are not authorized to use the aggregator.
400 Invalid.ResourceOwnerId.Value The specified ResourceOwnerId is invalid. The specified ResourceOwnerId is invalid.
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 Error Codes for a complete list.

Release notes

See Release Notes for a complete list.