use of software.amazon.awssdk.services.iam.model.DeleteServerCertificateRequest in project aws-doc-sdk-examples by awsdocs.
the class DeleteServerCertificate method deleteCert.
// snippet-start:[iam.java2.delete_server_certificate.main]
public static void deleteCert(IamClient iam, String certName) {
try {
DeleteServerCertificateRequest request = DeleteServerCertificateRequest.builder().serverCertificateName(certName).build();
iam.deleteServerCertificate(request);
System.out.println("Successfully deleted server certificate " + certName);
} catch (IamException e) {
System.err.println(e.awsErrorDetails().errorMessage());
System.exit(1);
}
}
Aggregations