use of com.amazonaws.services.identitymanagement.model.UpdateServerCertificateRequest in project aws-doc-sdk-examples by awsdocs.
the class UpdateServerCertificate method main.
public static void main(String[] args) {
final String USAGE = "To run this example, supply the current certificate name and\n" + "a new name. Ex:\n\n" + "UpdateServerCertificate <current-name> <new-name>\n";
if (args.length != 2) {
System.out.println(USAGE);
System.exit(1);
}
String cur_name = args[0];
String new_name = args[1];
final AmazonIdentityManagement iam = AmazonIdentityManagementClientBuilder.defaultClient();
UpdateServerCertificateRequest request = new UpdateServerCertificateRequest().withServerCertificateName(cur_name).withNewServerCertificateName(new_name);
UpdateServerCertificateResult response = iam.updateServerCertificate(request);
System.out.printf("Successfully updated server certificate to name %s", new_name);
}
Aggregations