Search in sources :

Example 11 with GenerateDataKeyRequest

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);
}
Also used : GenerateDataKeyRequest(com.amazonaws.services.kms.model.GenerateDataKeyRequest)

Example 12 with GenerateDataKeyRequest

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);
}
Also used : GenerateDataKeyRequest(com.amazonaws.services.kms.model.GenerateDataKeyRequest)

Example 13 with GenerateDataKeyRequest

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);
}
Also used : GenerateDataKeyRequest(com.amazonaws.services.kms.model.GenerateDataKeyRequest)

Example 14 with GenerateDataKeyRequest

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);
}
Also used : GenerateDataKeyRequest(com.amazonaws.services.kms.model.GenerateDataKeyRequest)

Example 15 with GenerateDataKeyRequest

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);
}
Also used : GenerateDataKeyRequest(com.amazonaws.services.kms.model.GenerateDataKeyRequest)

Aggregations

GenerateDataKeyRequest (com.amazonaws.services.kms.model.GenerateDataKeyRequest)15 GenerateDataKeyResult (com.amazonaws.services.kms.model.GenerateDataKeyResult)2 ByteBuffer (java.nio.ByteBuffer)2 AWSCredentials (com.amazonaws.auth.AWSCredentials)1 BasicAWSCredentials (com.amazonaws.auth.BasicAWSCredentials)1 AWSKMS (com.amazonaws.services.kms.AWSKMS)1 AWSKMSClient (com.amazonaws.services.kms.AWSKMSClient)1 DecryptRequest (com.amazonaws.services.kms.model.DecryptRequest)1 WSPasswordCallback (org.apache.wss4j.common.ext.WSPasswordCallback)1 Document (org.w3c.dom.Document)1 Element (org.w3c.dom.Element)1