use of com.amazonaws.services.kms.model.GenerateDataKeyRequest in project checker-framework by typetools.
the class GenerateDataKeyRequestExamples method incorrect5.
// This example is "neither"
void incorrect5(AWSKMS client) {
GenerateDataKeyRequest request = new GenerateDataKeyRequest();
// :: error: argument
client.generateDataKey(request);
}
use of com.amazonaws.services.kms.model.GenerateDataKeyRequest in project checker-framework by typetools.
the class GenerateDataKeyRequestExamples method incorrect1.
// The next four examples are "both"
void incorrect1(AWSKMS client) {
GenerateDataKeyRequest request = new GenerateDataKeyRequest();
request.setKeySpec(DataKeySpec.AES_256);
request.setNumberOfBytes(32);
// :: error: argument
client.generateDataKey(request);
}
use of com.amazonaws.services.kms.model.GenerateDataKeyRequest in project checker-framework by typetools.
the class GenerateDataKeyRequestExamples method setTwice2.
void setTwice2(AWSKMS client) {
GenerateDataKeyRequest request = new GenerateDataKeyRequest();
request.withKeySpec(DataKeySpec.AES_256);
request.setKeySpec(DataKeySpec.AES_256);
client.generateDataKey(request);
}
use of com.amazonaws.services.kms.model.GenerateDataKeyRequest in project checker-framework by typetools.
the class GenerateDataKeyRequestExamples method correctWithKeySpec.
void correctWithKeySpec(AWSKMS client) {
GenerateDataKeyRequest request = new GenerateDataKeyRequest();
request.withKeySpec(DataKeySpec.AES_256);
client.generateDataKey(request);
}
use of com.amazonaws.services.kms.model.GenerateDataKeyRequest in project checker-framework by typetools.
the class GenerateDataKeyRequestExamples method correctSetKeySpec.
void correctSetKeySpec(AWSKMS client) {
GenerateDataKeyRequest request = new GenerateDataKeyRequest();
request.setKeySpec(DataKeySpec.AES_256);
client.generateDataKey(request);
}
Aggregations