putDefaultEncryptionConfiguration method

Future<PutDefaultEncryptionConfigurationResponse> putDefaultEncryptionConfiguration({
  1. required EncryptionType encryptionType,
  2. String? kmsKeyId,
})

Sets the default encryption configuration for the Amazon Web Services account. For more information, see Key management in the IoT SiteWise User Guide.

May throw ConflictingOperationException. May throw InternalFailureException. May throw InvalidRequestException. May throw LimitExceededException. May throw ThrottlingException.

Parameter encryptionType : The type of encryption used for the encryption configuration.

Parameter kmsKeyId : The Key ID of the customer managed key used for KMS encryption. This is required if you use KMS_BASED_ENCRYPTION.

Implementation

Future<PutDefaultEncryptionConfigurationResponse>
    putDefaultEncryptionConfiguration({
  required EncryptionType encryptionType,
  String? kmsKeyId,
}) async {
  final $payload = <String, dynamic>{
    'encryptionType': encryptionType.value,
    if (kmsKeyId != null) 'kmsKeyId': kmsKeyId,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/configuration/account/encryption',
    exceptionFnMap: _exceptionFns,
  );
  return PutDefaultEncryptionConfigurationResponse.fromJson(response);
}