Search in sources :

Example 16 with KmsClient

use of software.amazon.awssdk.services.kms.KmsClient in project aws-doc-sdk-examples by awsdocs.

the class ListKeys method main.

public static void main(String[] args) {
    Region region = Region.US_WEST_2;
    KmsClient kmsClient = KmsClient.builder().region(region).build();
    listAllKeys(kmsClient);
    kmsClient.close();
}
Also used : Region(software.amazon.awssdk.regions.Region) KmsClient(software.amazon.awssdk.services.kms.KmsClient)

Example 17 with KmsClient

use of software.amazon.awssdk.services.kms.KmsClient in project aws-doc-sdk-examples by awsdocs.

the class KMSEncryptionExample method getKMSClient.

// Return a KmsClient object
private static KmsClient getKMSClient() {
    Region region = Region.US_EAST_1;
    KmsClient kmsClient = KmsClient.builder().region(region).build();
    return kmsClient;
}
Also used : Region(software.amazon.awssdk.regions.Region) KmsClient(software.amazon.awssdk.services.kms.KmsClient)

Aggregations

KmsClient (software.amazon.awssdk.services.kms.KmsClient)17 Region (software.amazon.awssdk.regions.Region)15 SdkBytes (software.amazon.awssdk.core.SdkBytes)3 KmsException (software.amazon.awssdk.services.kms.model.KmsException)2 DynamoDbClient (software.amazon.awssdk.services.dynamodb.DynamoDbClient)1 DecryptRequest (software.amazon.awssdk.services.kms.model.DecryptRequest)1 DecryptResponse (software.amazon.awssdk.services.kms.model.DecryptResponse)1 EncryptRequest (software.amazon.awssdk.services.kms.model.EncryptRequest)1 EncryptResponse (software.amazon.awssdk.services.kms.model.EncryptResponse)1