本文整理汇总了Java中com.amazonaws.services.kms.AWSKMSClientBuilder.defaultClient方法的典型用法代码示例。如果您正苦于以下问题:Java AWSKMSClientBuilder.defaultClient方法的具体用法?Java AWSKMSClientBuilder.defaultClient怎么用?Java AWSKMSClientBuilder.defaultClient使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.amazonaws.services.kms.AWSKMSClientBuilder
的用法示例。
在下文中一共展示了AWSKMSClientBuilder.defaultClient方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: awsKms
import com.amazonaws.services.kms.AWSKMSClientBuilder; //导入方法依赖的package包/类
/**
* Creates the KMS client {@link Bean}.
*
* Uses the default client, but if a region is unspecified, uses {@code us-east-1}.
*
* @return The KMS client.
*/
@Bean
public AWSKMS awsKms() {
AWSKMS client = null;
try {
client = AWSKMSClientBuilder.defaultClient();
} catch (SdkClientException exception) {
API_LOG.info("Default KMS client failed to build, trying again with region us-east-1", exception);
client = planB();
}
return client;
}
示例2: S3FileLoader
import com.amazonaws.services.kms.AWSKMSClientBuilder; //导入方法依赖的package包/类
public S3FileLoader(@Nonnull String bucketName, @Nonnull String key) {
// Necessary to use *ClientBuilder for correct defaults (especially region selection).
s3Client = AmazonS3ClientBuilder.defaultClient();
kmsClient = AWSKMSClientBuilder.defaultClient();
this.bucketName = bucketName;
this.key = key;
}
示例3: AwsPrivateKeyStore
import com.amazonaws.services.kms.AWSKMSClientBuilder; //导入方法依赖的package包/类
public AwsPrivateKeyStore() {
this(initAmazonS3(), AWSKMSClientBuilder.defaultClient());
kmsDecrypt = Boolean.parseBoolean(System.getProperty(ATHENZ_PROP_AWS_KMS_DECRYPT, "false"));
}
示例4: getClient
import com.amazonaws.services.kms.AWSKMSClientBuilder; //导入方法依赖的package包/类
/**
* Create an AWS KMS client.
* @return Create new instance of builder with all defaults set with the DefaultAWSCredentialsProviderChain
*/
private AWSKMS getClient() {
return AWSKMSClientBuilder.defaultClient();
}
示例5: getClient
import com.amazonaws.services.kms.AWSKMSClientBuilder; //导入方法依赖的package包/类
/**
* Create an AWS KMS client.
* @return
*/
private AWSKMS getClient() {
return AWSKMSClientBuilder.defaultClient();
}