Skip to content

/AWS1/IF_IOT=>UPDATEENCRYPTIONCONF()

About UpdateEncryptionConfiguration

Updates the encryption configuration. By default, all Amazon Web Services IoT Core data at rest is encrypted using Amazon Web Services owned keys. Amazon Web Services IoT Core also supports symmetric customer managed keys from Amazon Web Services Key Management Service (KMS). With customer managed keys, you create, own, and manage the KMS keys in your Amazon Web Services account. For more information, see Data encryption in the Amazon Web Services IoT Core Developer Guide.

Method Signature

IMPORTING

Required arguments:

iv_encryptiontype TYPE /AWS1/IOTENCRYPTIONTYPE /AWS1/IOTENCRYPTIONTYPE

The type of the Amazon Web Services Key Management Service (KMS) key.

Optional arguments:

iv_kmskeyarn TYPE /AWS1/IOTKMSKEYARN /AWS1/IOTKMSKEYARN

The ARN of the customer-managed KMS key.

iv_kmsaccessrolearn TYPE /AWS1/IOTKMSACCESSROLEARN /AWS1/IOTKMSACCESSROLEARN

The Amazon Resource Name (ARN) of the IAM role assumed by Amazon Web Services IoT Core to call KMS on behalf of the customer.

RETURNING

oo_output TYPE REF TO /aws1/cl_iotupdateencconfrsp /AWS1/CL_IOTUPDATEENCCONFRSP

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->/aws1/if_iot~updateencryptionconf(
  iv_encryptiontype = |string|
  iv_kmsaccessrolearn = |string|
  iv_kmskeyarn = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
ENDIF.

UpdateEncryptionConfiguration example

This operation updates the encryption configuration.

DATA(lo_result) = lo_client->/aws1/if_iot~updateencryptionconf(
  iv_encryptiontype = |CUSTOMER_MANAGED_KMS_KEY|
  iv_kmsaccessrolearn = |arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab|
  iv_kmskeyarn = |arn:aws:iam:us-west-2:111122223333:role/myrole|
).