Menu
AWS Config
API Reference (API Version 2014-11-12)

GetResourceConfigHistory

Returns a list of configuration items for the specified resource. The list contains details about each state of the resource during the specified time interval.

The response is paginated. By default, AWS Config returns a limit of 10 configuration items per page. You can customize this number with the limit parameter. The response includes a nextToken string. To get the next page of results, run the request again and specify the string for the nextToken parameter.

Note

Each call to the API is limited to span a duration of seven days. It is likely that the number of records returned is smaller than the specified limit. In such cases, you can make another call, using the nextToken.

Request Syntax

{
   "chronologicalOrder": "string",
   "earlierTime": number,
   "laterTime": number,
   "limit": number,
   "nextToken": "string",
   "resourceId": "string",
   "resourceType": "string"
}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

chronologicalOrder

The chronological order for configuration items listed. By default the results are listed in reverse chronological order.

Type: String

Valid Values: Reverse | Forward

Required: No

earlierTime

The time stamp that indicates an earlier time. If not specified, the action returns paginated results that contain configuration items that start from when the first configuration item was recorded.

Type: Timestamp

Required: No

laterTime

The time stamp that indicates a later time. If not specified, current time is taken.

Type: Timestamp

Required: No

limit

The maximum number of configuration items returned on each page. The default is 10. You cannot specify a limit greater than 100. If you specify 0, AWS Config uses the default.

Type: Integer

Valid Range: Minimum value of 0. Maximum value of 100.

Required: No

nextToken

The nextToken string returned on a previous page that you use to get the next page of results in a paginated response.

Type: String

Required: No

resourceId

The ID of the resource (for example., sg-xxxxxx).

Type: String

Required: Yes

resourceType

The resource type.

Type: String

Valid Values: AWS::EC2::CustomerGateway | AWS::EC2::EIP | AWS::EC2::Host | AWS::EC2::Instance | AWS::EC2::InternetGateway | AWS::EC2::NetworkAcl | AWS::EC2::NetworkInterface | AWS::EC2::RouteTable | AWS::EC2::SecurityGroup | AWS::EC2::Subnet | AWS::CloudTrail::Trail | AWS::EC2::Volume | AWS::EC2::VPC | AWS::EC2::VPNConnection | AWS::EC2::VPNGateway | AWS::IAM::Group | AWS::IAM::Policy | AWS::IAM::Role | AWS::IAM::User | AWS::ACM::Certificate | AWS::RDS::DBInstance | AWS::RDS::DBSubnetGroup | AWS::RDS::DBSecurityGroup | AWS::RDS::DBSnapshot | AWS::RDS::EventSubscription | AWS::ElasticLoadBalancingV2::LoadBalancer | AWS::S3::Bucket | AWS::SSM::ManagedInstanceInventory | AWS::Redshift::Cluster | AWS::Redshift::ClusterSnapshot | AWS::Redshift::ClusterParameterGroup | AWS::Redshift::ClusterSecurityGroup | AWS::Redshift::ClusterSubnetGroup | AWS::Redshift::EventSubscription | AWS::CloudWatch::Alarm | AWS::CloudFormation::Stack | AWS::DynamoDB::Table | AWS::AutoScaling::AutoScalingGroup | AWS::AutoScaling::LaunchConfiguration | AWS::AutoScaling::ScalingPolicy | AWS::AutoScaling::ScheduledAction

Required: Yes

Response Syntax

{
   "configurationItems": [ 
      { 
         "accountId": "string",
         "arn": "string",
         "availabilityZone": "string",
         "awsRegion": "string",
         "configuration": "string",
         "configurationItemCaptureTime": number,
         "configurationItemMD5Hash": "string",
         "configurationItemStatus": "string",
         "configurationStateId": "string",
         "relatedEvents": [ "string" ],
         "relationships": [ 
            { 
               "relationshipName": "string",
               "resourceId": "string",
               "resourceName": "string",
               "resourceType": "string"
            }
         ],
         "resourceCreationTime": number,
         "resourceId": "string",
         "resourceName": "string",
         "resourceType": "string",
         "supplementaryConfiguration": { 
            "string" : "string" 
         },
         "tags": { 
            "string" : "string" 
         },
         "version": "string"
      }
   ],
   "nextToken": "string"
}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

configurationItems

A list that contains the configuration history of one or more resources.

Type: Array of ConfigurationItem objects

nextToken

The string that you use in a subsequent request to get the next page of results in a paginated response.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidLimitException

The specified limit is outside the allowable range.

HTTP Status Code: 400

InvalidNextTokenException

The specified next token is invalid. Specify the NextToken string that was returned in the previous response to get the next page of results.

HTTP Status Code: 400

InvalidTimeRangeException

The specified time range is not valid. The earlier time is not chronologically before the later time.

HTTP Status Code: 400

NoAvailableConfigurationRecorderException

There are no configuration recorders available to provide the role needed to describe your resources. Create a configuration recorder.

HTTP Status Code: 400

ResourceNotDiscoveredException

You have specified a resource that is either unknown or has not been discovered.

HTTP Status Code: 400

ValidationException

The requested action is not valid.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: