本文整理匯總了Java中com.amazonaws.services.identitymanagement.model.DeleteServerCertificateRequest類的典型用法代碼示例。如果您正苦於以下問題:Java DeleteServerCertificateRequest類的具體用法?Java DeleteServerCertificateRequest怎麽用?Java DeleteServerCertificateRequest使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
DeleteServerCertificateRequest類屬於com.amazonaws.services.identitymanagement.model包,在下文中一共展示了DeleteServerCertificateRequest類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: main
import com.amazonaws.services.identitymanagement.model.DeleteServerCertificateRequest; //導入依賴的package包/類
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);
}
示例2: deleteServerCert
import com.amazonaws.services.identitymanagement.model.DeleteServerCertificateRequest; //導入依賴的package包/類
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;
});
}
示例3: deleteServerCertificate
import com.amazonaws.services.identitymanagement.model.DeleteServerCertificateRequest; //導入依賴的package包/類
/**
* Deletes the server certificate.
*
* @param name The server certificate name
*/
public void deleteServerCertificate(final String name) {
client.deleteServerCertificate(new DeleteServerCertificateRequest().withServerCertificateName(name));
}