public static void main(String[] args) { final AmazonIdentityManagement iam = AmazonIdentityManagementClientBuilder.defaultClient(); boolean done = false; ListServerCertificatesRequest request = new ListServerCertificatesRequest(); while(!done) { ListServerCertificatesResult response = iam.listServerCertificates(request); for(ServerCertificateMetadata metadata : response.getServerCertificateMetadataList()) { System.out.printf("Retrieved server certificate %s", metadata.getServerCertificateName()); } request.setMarker(response.getMarker()); if(!response.getIsTruncated()) { done = true; } } }
public List<ServerCertificateMetadata> getCertificates(){ ListServerCertificatesResult listSigningCertificates = identityClient.listServerCertificates(); return listSigningCertificates.getServerCertificateMetadataList(); }
public List<ServerCertificateMetadata> listServerCerts(String path) { logger.info("list server certs, path={}", path); ListServerCertificatesResult result = iam.listServerCertificates(new ListServerCertificatesRequest().withPathPrefix(path)); return result.getServerCertificateMetadataList(); }