Search in sources :

Example 1 with DeleteServerCertificateResult

use of com.amazonaws.services.identitymanagement.model.DeleteServerCertificateResult in project aws-doc-sdk-examples by awsdocs.

the class DeleteServerCertificate method main.

public static void main(String[] args) {
    final String USAGE = "To run this example, supply a certificate name\n" + "Ex: DeleteServerCertificate <certificate-name>\n";
    if (args.length != 1) {
        System.out.println(USAGE);
        System.exit(1);
    }
    String cert_name = args[0];
    final AmazonIdentityManagement iam = AmazonIdentityManagementClientBuilder.defaultClient();
    DeleteServerCertificateRequest request = new DeleteServerCertificateRequest().withServerCertificateName(cert_name);
    DeleteServerCertificateResult response = iam.deleteServerCertificate(request);
    System.out.println("Successfully deleted server certificate " + cert_name);
}
Also used : DeleteServerCertificateRequest(com.amazonaws.services.identitymanagement.model.DeleteServerCertificateRequest) DeleteServerCertificateResult(com.amazonaws.services.identitymanagement.model.DeleteServerCertificateResult) AmazonIdentityManagement(com.amazonaws.services.identitymanagement.AmazonIdentityManagement)

Aggregations

AmazonIdentityManagement (com.amazonaws.services.identitymanagement.AmazonIdentityManagement)1 DeleteServerCertificateRequest (com.amazonaws.services.identitymanagement.model.DeleteServerCertificateRequest)1 DeleteServerCertificateResult (com.amazonaws.services.identitymanagement.model.DeleteServerCertificateResult)1