private String getExistingOriginAccessId() {
        List<CloudFrontOriginAccessIdentitySummary> oaiList =
            cfClient.listCloudFrontOriginAccessIdentities(
                new ListCloudFrontOriginAccessIdentitiesRequest())
                    .getCloudFrontOriginAccessIdentityList().getItems();
        if (oaiList != null && oaiList.size() > 0) {
            return oaiList.iterator().next().getId();
        }
        return null;
    }
private String getExistingOriginAccessId ( ) { List < CloudFrontOriginAccessIdentitySummary > oaiList = cfClient . listCloudFrontOriginAccessIdentities ( new ListCloudFrontOriginAccessIdentitiesRequest ( ) ) . getCloudFrontOriginAccessIdentityList ( ) . getItems ( ) ; if ( oaiList != null && oaiList . size ( ) > 0 ) { return oaiList . iterator ( ) . next ( ) . getId ( ) ; } return null ; }
/*
Attempts to get an existing origin access ID