Creates or updates the encryption configuration. Amazon Web Services IoT FleetWise can encrypt your data and resources using an Amazon Web Services managed key. Or, you can use a KMS key that you own and manage. For more information, see Data encryption in the Amazon Web Services IoT FleetWise Developer Guide.
Parameters:
-
kms_key_id
(Optional[str], default:
None
)
–
The ID of the KMS key that is used for encryption.
-
encryption_type
(EncryptionType)
–
The type of encryption. Choose KMS_BASED_ENCRYPTION to use a KMS key or FLEETWISE_DEFAULT_ENCRYPTION to use an Amazon Web Services managed key.
Raises:
Source code in docs_src/capo_iotfleetwise/_services/io_t_fleet_wise.py
| def put_encryption_configuration(
self,
encryption_type: "capo_iotfleetwise.types.encryption_type.EncryptionType",
*,
config_overrides: Optional[IoTFleetWiseClientConfig] = None,
kms_key_id: Optional[str] = None,
) -> "capo_iotfleetwise.types.put_encryption_configuration_response.PutEncryptionConfigurationResponse":
"""<p>Creates or updates the encryption configuration. Amazon Web Services IoT FleetWise can encrypt your data and resources using an Amazon Web Services managed key. Or, you can use a KMS key that you own and manage. For more information, see <a href="https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/data-encryption.html">Data encryption</a> in the <i>Amazon Web Services IoT FleetWise Developer Guide</i>.</p>
Args:
kms_key_id: <p>The ID of the KMS key that is used for encryption.</p>
encryption_type: <p>The type of encryption. Choose <code>KMS_BASED_ENCRYPTION</code> to use a KMS key or <code>FLEETWISE_DEFAULT_ENCRYPTION</code> to use an Amazon Web Services managed key.</p>
Raises:
capo_iotfleetwise.errors.internal_server_exception.InternalServerException: <p>The request couldn't be completed because the server temporarily failed.</p>
capo_iotfleetwise.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient permission to perform this action.</p>
capo_iotfleetwise.errors.conflict_exception.ConflictException: <p>The request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time.</p>
capo_iotfleetwise.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource wasn't found.</p>
capo_iotfleetwise.errors.throttling_exception.ThrottlingException: <p>The request couldn't be completed due to throttling.</p>
capo_iotfleetwise.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
capo_iotfleetwise.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_iotfleetwise.types.put_encryption_configuration_request.PutEncryptionConfigurationRequest]",
) -> OperationResponse[
"capo_iotfleetwise.types.put_encryption_configuration_response.PutEncryptionConfigurationResponse"
]:
import capo_iotfleetwise._operations.io_t_autobahn_control_plane.put_encryption_configuration
output, http_response = (
capo_iotfleetwise._operations.io_t_autobahn_control_plane.put_encryption_configuration.put_encryption_configuration(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("PutEncryptionConfiguration")
)
input_: capo_iotfleetwise.types.put_encryption_configuration_request.PutEncryptionConfigurationRequest = {
"encryption_type": encryption_type
}
if kms_key_id is not None:
input_["kms_key_id"] = kms_key_id
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|