// -----------------------------------------------------------
// CloudFront Private Distributions - Origin Access Identities
// -----------------------------------------------------------
// Create a new origin access identity
OriginAccessIdentity originAccessIdentity =
cloudFrontService.createOriginAccessIdentity(null, "Testing");
System.out.println(originAccessIdentity.toString());
// List your origin access identities
List<OriginAccessIdentity> originAccessIdentityList =
cloudFrontService.getOriginAccessIdentityList();
System.out.println(originAccessIdentityList);
// Obtain an origin access identity ID for future use
OriginAccessIdentity identity = originAccessIdentityList.get(1);
String originAccessIdentityId = identity.getId();
System.out.println("originAccessIdentityId: " + originAccessIdentityId);
// Lookup information about a specific origin access identity
originAccessIdentity =
cloudFrontService.getOriginAccessIdentity(originAccessIdentityId);