View a markdown version of this page

ListHostedZoneChangeBatches - Amazon Route 53

ListHostedZoneChangeBatches

Lists the change batches in an Amazon Route 53 hosted zone. For each change batch, the response contains its change ID, the operation that submitted it, and when and by whom it was submitted. It also contains the request ID, the comment if there is one, and the number of changes. Use this list to review who changed the hosted zone and when.

Each change batch records one ChangeResourceRecordSets or CreateHostedZone request. A CreateHostedZone change batch has a ChangeCount of 0.

You can read a change batch for 365 days after it was submitted, but not from before the RetentionStartsAt time that GetHostedZone returns in Features/ChangeHistory. If Change History isn't turned on for the hosted zone, Route 53 returns a FeatureNotEnabled error.

Results are paginated. To get the next page, use the NextToken value from the response. To get the changes in a change batch, use GetHostedZoneChangeBatch.

Request Syntax

GET /2013-04-01/hostedzone/Id/changebatches?maxresults=MaxResults&nexttoken=NextToken&sortorder=SortOrder&startafterchangeid=StartAfterChangeId&submittedafter=SubmittedAfter&submittedbefore=SubmittedBefore HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

Id

The ID of the hosted zone that you want to list change batches for.

Length Constraints: Maximum length of 32.

Required: Yes

maxresults

The maximum number of change batches that you want Route 53 to return in this response. Specify a value from 1 to 1,000. If you don't specify a value, Route 53 returns up to 100 change batches.

nexttoken

If the response to a previous ListHostedZoneChangeBatches request included a NextToken element, specify that value here to get the next page of results. If the previous request included any of the following parameters, include them with exactly the same values: SubmittedAfter, SubmittedBefore, SortOrder, and StartAfterChangeId. If you don't, Route 53 returns an InvalidInput error. If you don't specify NextToken, Route 53 returns the first page of results.

A NextToken expires 24 hours after Route 53 returns it, and you can use it only with the hosted zone that it was returned for.

Length Constraints: Maximum length of 1024.

sortorder

The order in which you want Route 53 to return change batches. Valid values:

  • DESCENDING – Newest first. This is the default.

  • ASCENDING – Oldest first.

Valid Values: ASCENDING | DESCENDING

startafterchangeid

Returns the change batches after the specified change batch, not including it. Use this to read new change batches since the last change batch that you processed.

If you specify StartAfterChangeId, you must also specify SortOrder ASCENDING, and you can't specify SubmittedAfter or SubmittedBefore. If the change batch has expired, is from before RetentionStartsAt, or isn't in the hosted zone, Route 53 returns an InvalidInput error.

Length Constraints: Maximum length of 32.

submittedafter

The start of the time range, in ISO 8601 format with a UTC offset, for example 2026-12-01T00:00:00Z or 2026-12-01T05:30:00.123+05:30. You can specify up to nine fractional digits. Route 53 rounds a value with more than millisecond precision up to the next millisecond. The range includes SubmittedAfter.

If you don't specify a value, the range starts at RetentionStartsAt. If you specify a value that's earlier than RetentionStartsAt, Route 53 returns an InvalidInput error that includes the earliest time that you can specify.

Because submit times can be slightly out of order, a returned SubmittedAt can fall just outside the range that you requested.

Length Constraints: Maximum length of 35.

Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]{1,9})?(Z|[+-]([01][0-9]|2[0-3]):[0-5][0-9])$

submittedbefore

The end of the time range, in ISO 8601 format with a UTC offset, for example 2026-12-02T00:00:00Z or 2026-12-02T05:30:00.123+05:30. You can specify up to nine fractional digits. Route 53 rounds a value with more than millisecond precision up to the next millisecond. The range excludes SubmittedBefore. The value must be at least one millisecond later than SubmittedAfter, or later than RetentionStartsAt if you omit SubmittedAfter.

If the range ends within a few seconds of the current time, a later request for the same range might return more change batches.

Length Constraints: Maximum length of 35.

Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\.[0-9]{1,9})?(Z|[+-]([01][0-9]|2[0-3]):[0-5][0-9])$

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 <?xml version="1.0" encoding="UTF-8"?> <ListHostedZoneChangeBatchesResponse> <ChangeBatchSummaries> <ChangeBatchSummary> <ChangeCount>long</ChangeCount> <ChangeId>string</ChangeId> <Comment>string</Comment> <Operation>string</Operation> <RequestId>string</RequestId> <SubmittedAt>timestamp</SubmittedAt> <SubmittedBy>string</SubmittedBy> </ChangeBatchSummary> </ChangeBatchSummaries> <NextToken>string</NextToken> </ListHostedZoneChangeBatchesResponse>

Response Elements

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

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

ListHostedZoneChangeBatchesResponse

Root level tag for the ListHostedZoneChangeBatchesResponse parameters.

Required: Yes

ChangeBatchSummaries

A summary of each change batch on this page of results. The list is empty if there are no change batches in the range that you specified.

Type: Array of ChangeBatchSummary objects

NextToken

If there might be more change batches to list, a token that you can specify in the NextToken parameter of another request to get the next page of results. If there are no more change batches to list, the response doesn't include NextToken.

Type: String

Length Constraints: Maximum length of 1024.

Errors

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

FeatureNotEnabled

This error occurs when a feature that the operation requires isn't turned on for the hosted zone. For example, the tier of the hosted zone doesn't include Change History. To resolve this error, turn on the feature, or move the hosted zone to a tier that includes it.

message

A message that explains which feature isn't turned on.

HTTP Status Code: 403

InvalidInput

The input is not valid.

message

HTTP Status Code: 400

InvalidPaginationToken

The value that you specified to get the second or subsequent page of results is invalid.

HTTP Status Code: 400

NoSuchHostedZone

No hosted zone exists with the ID that you specified.

message

HTTP Status Code: 404

See Also

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