| Did this page help you? Yes No Tell us about it... |
The InvalidationBatch complex type describes the invalidation batch. For more information about
invalidation, go to Object Invalidation in the
Amazon CloudFront Developer Guide.
This complex type is a request element in POST Invalidation, and is a response element in GET Invalidation List and GET Invalidation.
<InvalidationBatch xmlns="http://cloudfront.amazonaws.com/doc/2012-05-05/">
<Paths>
<Quantity>number of objects to invalidate</Quantity>
<Items>
<Path>path to object to invalidate</Path>
</Items>
</Paths>
<CallerReference>unique identifier for this invalidation batch</CallerReference>
</InvalidationBatch>
The following table describes the child elements in the InvalidationBatch datatype.
| Name | Description |
|---|---|
|
|
A complex type that contains information about the objects that you want to invalidate. Type: Complex Default: None Children: Parent: |
|
|
The number of objects that you want to invalidate. Type: Integer Default: None Parent: |
|
|
A complex type that contains a list of the objects that you want to invalidate. Type: Complex Default: None Children: Parent: |
|
|
The path of the object to invalidate. The path is relative to the distribution and must begin with a slash (/).
For example, to invalidate the object at
You must enclose each invalidation object with the To invalidate the default root object, specify the path to the object the same way you specify the path to any other object. You can make any number of invalidation requests, but you can have only three invalidation requests
per distribution in progress at one time. Each request can contain up to 1,000 objects to invalidate. If you
exceed these limits, CloudFront returns an error message. To determine how many invalidation batches are currently
in progress, run GET Distribution and see the value of the
If the object is a directory and if you have not standardized on a method for specifying directorieswith or without
a trailing slash (/)we recommend that you invalidate the directory both with and without a
trailing slash, for example, If the path includes non-ASCII characters or unsafe characters as defined in RFC 1783 (http://www.ietf.org/rfc/rfc1738.txt), URL encode those characters. Do not URL encode any other characters in the path, or CloudFront will not invalidate the old version of the updated object. Type: String Default: None Constraints: Maximum 4,000 characters |
|
|
A value that you specify to uniquely identify an invalidation request. CloudFront uses the value to
prevent you from accidentally resubmitting an identical request. Whenever you create a
new invalidation request, you must specify a new value for If you make a second invalidation request with the same value for If Type: String Default: None Constraints: Allowable characters are any Unicode code points that are valid in an XML 1.0 document. The UTF-8 encoding of the value must be less than 128 bytes. |
Example of an invalidation batch request
The following example invalidation batch request is for invalidation of two image objects and a Flash movie object.
<InvalidationBatch xmlns="http://cloudfront.amazonaws.com/doc/2012-05-05/">
<Paths>
<Quantity>3</Quantity>
<Items>
<Path>/image1.jpg</Path>
<Path>/image2.jpg</Path>
<Path>/videos/movie.flv</Path>
</Items>
</Paths>
<CallerReference>20120301090001</CallerReference>
</InvalidationBatch>