use of software.amazon.awssdk.services.kms.model.DeleteAliasRequest in project aws-doc-sdk-examples by awsdocs.
the class DeleteAlias method deleteSpecificAlias.
// snippet-start:[kms.java2_delete_alias.main]
public static void deleteSpecificAlias(KmsClient kmsClient, String aliasName) {
try {
DeleteAliasRequest deleteAliasRequest = DeleteAliasRequest.builder().aliasName(aliasName).build();
kmsClient.deleteAlias(deleteAliasRequest);
} catch (KmsException e) {
System.err.println(e.getMessage());
System.exit(1);
}
}
Aggregations