Java 类com.amazonaws.services.identitymanagement.model.DeleteServerCertificateRequest 实例源码

项目:aws-doc-sdk-examples    文件:DeleteServerCertificate.java   
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);
    }
项目:cmn-project    文件:IAM.java   
public void deleteServerCert(String name) throws Exception {
    logger.info("delete server cert, name={}", name);

    // after delete ELB listener, it may not be visible to IAM immediately
    new Runner<Void>()
        .maxAttempts(3)
        .retryInterval(Duration.ofSeconds(20))
        .retryOn(e -> e instanceof AmazonServiceException && "DeleteConflict".equals(((AmazonServiceException) e).getErrorCode()))
        .run(() -> {
            iam.deleteServerCertificate(new DeleteServerCertificateRequest(name));
            return null;
        });
}
项目:cerberus-lifecycle-cli    文件:IdentityManagementService.java   
/**
 * Deletes the server certificate.
 *
 * @param name The server certificate name
 */
public void deleteServerCertificate(final String name) {
    client.deleteServerCertificate(new DeleteServerCertificateRequest().withServerCertificateName(name));
}