updateEncryptionConfiguration
inline suspend fun IotClient.updateEncryptionConfiguration(crossinline block: UpdateEncryptionConfigurationRequest.Builder.() -> Unit): UpdateEncryptionConfigurationResponse
Updates the encryption configuration. By default, Amazon Web Services IoT Core encrypts your data at rest using Amazon Web Services owned keys. Amazon Web Services IoT Core also supports symmetric customer managed keys from Key Management Service (KMS). With customer managed keys, you create, own, and manage the KMS keys in your Amazon Web Services account.
Before using this API, you must set up permissions for Amazon Web Services IoT Core to access KMS. For more information, see Data encryption at rest in the Amazon Web Services IoT Core Developer Guide.
Samples
import aws.sdk.kotlin.services.iot.model.EncryptionType
fun main() {
//sampleStart
// This operation updates the encryption configuration.
iotClient.updateEncryptionConfiguration {
encryptionType = EncryptionType.fromValue("CUSTOMER_MANAGED_KMS_KEY")
kmsKeyArn = "arn:aws:iam:us-west-2:111122223333:role/myrole"
kmsAccessRoleArn = "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
}
//sampleEnd
}