use of software.amazon.awssdk.services.kms.model.RevokeGrantRequest in project aws-doc-sdk-examples by awsdocs.
the class RevokeGrant method revokeKeyGrant.
// snippet-start:[kms.java2_revoke_grant.main]
public static void revokeKeyGrant(KmsClient kmsClient, String keyId, String grantId) {
try {
RevokeGrantRequest grantRequest = RevokeGrantRequest.builder().keyId(keyId).grantId(grantId).build();
kmsClient.revokeGrant(grantRequest);
} catch (KmsException e) {
System.err.println(e.getMessage());
System.exit(1);
}
}
Aggregations