Storage Gateway에서 스냅 샷 목록을 가져 와서 JTable에 넣으려고합니다. 그러나 AWS Java API를 사용하여 스냅 샷 목록을 검색하면 Amazon에서 게시 한 공개 스냅 샷 만 검색 할 수 있습니다. DescribeSnapshotsRequest.setOwnerIds()에 "self"를 포함하도록 설정하면 목록이 비어 있습니다. 내가 주인 ID로 "아마존"를 DescribeSnapshotsRequest를 제거하거나 설정 중 하나를하지 않는Java API를 사용하여 Storage Gateway 스냅 샷을 검색 할 수 없습니다.
private void createTable() {
Object[][] data = null;
String[] columns = new String[]{"Snapshot ID", "Owner ID", "Snapshot Date"};
DescribeSnapshotsRequest req = new DescribeSnapshotsRequest();
req.setOwnerIds(Arrays.<String>asList("self"));
try {
snapshots = ec2Client.describeSnapshots(req).getSnapshots();
data = new Object[snapshots.size()][3];
int i = 0;
for(Snapshot item : snapshots) {
data[i][0] = item.getSnapshotId();
data[i][1] = item.getOwnerId();
data[i][2] = item.getStartTime();
i++;
}
} catch(Exception e) {
System.out.println("Invalid Credentials!");
}
table = new JTable(data, columns);
table.setAutoCreateRowSorter(true);
}
리스트 스냅 샷이 비어 : 여기
는 잘못된 코드입니다.간단히 말해서 Storage Gateway에서 내 개인 스냅 샷에 액세스 할 수없는 이유는 무엇입니까?