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