Skip to content

/AWS1/IF_IOT=>UPDATEENCRYPTIONCONF()

About UpdateEncryptionConfiguration

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.

Method Signature

METHODS /AWS1/IF_IOT~UPDATEENCRYPTIONCONF
  IMPORTING
    !IV_ENCRYPTIONTYPE TYPE /AWS1/IOTENCRYPTIONTYPE OPTIONAL
    !IV_KMSKEYARN TYPE /AWS1/IOTKMSKEYARN OPTIONAL
    !IV_KMSACCESSROLEARN TYPE /AWS1/IOTKMSACCESSROLEARN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_iotupdateencconfrsp
  RAISING
    /AWS1/CX_IOTINTERNALFAILUREEX
    /AWS1/CX_IOTINVALIDREQUESTEX
    /AWS1/CX_IOTSERVICEUNAVAILEX
    /AWS1/CX_IOTTHROTTLINGEX
    /AWS1/CX_IOTUNAUTHORIZEDEX
    /AWS1/CX_IOTCLIENTEXC
    /AWS1/CX_IOTSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_encryptiontype TYPE /AWS1/IOTENCRYPTIONTYPE /AWS1/IOTENCRYPTIONTYPE

The type of the KMS key.

Optional arguments:

iv_kmskeyarn TYPE /AWS1/IOTKMSKEYARN /AWS1/IOTKMSKEYARN

The ARN of the customer managedKMS 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->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->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|
).