for (String regionId : regions) {
// enable with a ttl
assertNotNull(api.getCDNApiForRegion(regionId).enable(name, 777777));
// now get the container
CDNContainer original = api.getCDNApiForRegion(regionId).get(name);
assertTrue(original.isEnabled());
assertCDNContainerNotNull(original);
// update options
UpdateCDNContainerOptions opts = new UpdateCDNContainerOptions()
.ttl(1234567)
.logRetention(true)
.enabled(false);
// update the container
assertTrue(api.getCDNApiForRegion(regionId).update(name, opts));
// now get the updated container
CDNContainer updated = api.getCDNApiForRegion(regionId).get(name);
assertFalse(updated.isEnabled());
assertCDNContainerNotNull(updated);
assertNotEquals(original.getTtl(), updated.getTtl());
assertTrue(updated.isLogRetentionEnabled());
}
}