// Invalidate objects in a distribution to force CloudFront to fetch the
// latest object data from the S3 origin.
String[] objectKeys = new String[] {"downloads.html"};
Invalidation invalidation = cloudFrontService.invalidateObjects(
testDistributionId,
objectKeys,
"" + System.currentTimeMillis() // Caller reference - a unique string value
);
System.out.println(invalidation);
// Retrieve details about a prior invalidation operation
String invalidationId = invalidation.getId();
Invalidation priorInvalidation = cloudFrontService.getInvalidation(
testDistributionId, invalidationId);
System.out.println(priorInvalidation);
// List summary information about all invalidations performed
// on a distribution.