use of com.microsoft.azure.keyvault.models.CertificateIssuerItem in project azure-sdk-for-java by Azure.
the class AsyncOperationsTest method issuerAsync.
@Test
public void issuerAsync() throws Exception {
String vault = getVaultUri();
String issuerName = "myIssuer";
SetCertificateIssuerRequest setCertificateIssuerRequest = new SetCertificateIssuerRequest.Builder(vault, issuerName, "Test").build();
IssuerBundle certificateIssuer = keyVaultClient.setCertificateIssuerAsync(setCertificateIssuerRequest, null).get();
Assert.assertNotNull(certificateIssuer);
UpdateCertificateIssuerRequest updateCertificateIssuerRequest = new UpdateCertificateIssuerRequest.Builder(vault, issuerName).withProvider("SslAdmin").build();
certificateIssuer = keyVaultClient.updateCertificateIssuerAsync(updateCertificateIssuerRequest, null).get();
Assert.assertNotNull(certificateIssuer);
certificateIssuer = keyVaultClient.getCertificateIssuerAsync(vault, issuerName, null).get();
Assert.assertNotNull(certificateIssuer);
List<CertificateIssuerItem> issuers = keyVaultClient.listCertificateIssuersAsync(vault, null).get();
Assert.assertNotNull(issuers);
keyVaultClient.deleteCertificateIssuerAsync(vault, issuerName, null).get();
}
Aggregations