Struct tink_awskms::AwsClient
source · pub struct AwsClient { /* private fields */ }
Expand description
AwsClient
represents a client that connects to the AWS KMS backend.
Implementations§
source§impl AwsClient
impl AwsClient
sourcepub fn new(uri_prefix: &str) -> Result<AwsClient, TinkError>
pub fn new(uri_prefix: &str) -> Result<AwsClient, TinkError>
Return a new AWS KMS client which will use default credentials to handle keys with
uri_prefix
prefix. uri_prefix
must have the following format:
aws-kms://arn:<partition>:kms:<region>:[:path]
See http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html.
sourcepub fn new_with_credentials(
uri_prefix: &str,
credential_path: &Path
) -> Result<AwsClient, TinkError>
pub fn new_with_credentials( uri_prefix: &str, credential_path: &Path ) -> Result<AwsClient, TinkError>
Return a new AWS KMS client which will use given credentials to handle keys with
uri_prefix
prefix. uri_prefix
must have the following format:
aws-kms://arn:<partition>:kms:<region>:[:path]
See http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html.
sourcepub fn new_with_kms(
uri_prefix: &str,
kms: KmsClient
) -> Result<AwsClient, TinkError>
pub fn new_with_kms( uri_prefix: &str, kms: KmsClient ) -> Result<AwsClient, TinkError>
Return a new AWS KMS client with user created KMS client. Client is responsible for keeping
the region consistency between key URI and KMS client. uri_prefix
must have the
following format: aws-kms://arn:<partition>:kms:<region>:[:path]
See http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html.