:doc:`IoTSiteWise <../../iotsitewise>` / Client / put_default_encryption_configuration

************************************
put_default_encryption_configuration
************************************



.. py:method:: IoTSiteWise.Client.put_default_encryption_configuration(**kwargs)

  

  Sets the default encryption configuration for the Amazon Web Services account. For more information, see `Key management <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/key-management.html>`__ in the *IoT SiteWise User Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iotsitewise-2019-12-02/PutDefaultEncryptionConfiguration>`_  


  **Request Syntax**
  ::

    response = client.put_default_encryption_configuration(
        encryptionType='SITEWISE_DEFAULT_ENCRYPTION'|'KMS_BASED_ENCRYPTION',
        kmsKeyId='string'
    )
    
  :type encryptionType: string
  :param encryptionType: **[REQUIRED]** 

    The type of encryption used for the encryption configuration.

    

  
  :type kmsKeyId: string
  :param kmsKeyId: 

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

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'encryptionType': 'SITEWISE_DEFAULT_ENCRYPTION'|'KMS_BASED_ENCRYPTION',
          'kmsKeyArn': 'string',
          'configurationStatus': {
              'state': 'ACTIVE'|'UPDATE_IN_PROGRESS'|'UPDATE_FAILED',
              'error': {
                  'code': 'VALIDATION_ERROR'|'INTERNAL_FAILURE',
                  'message': 'string'
              }
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **encryptionType** *(string) --* 

        The type of encryption used for the encryption configuration.

        
      

      - **kmsKeyArn** *(string) --* 

        The Key ARN of the KMS key used for KMS encryption if you use ``KMS_BASED_ENCRYPTION``.

        
      

      - **configurationStatus** *(dict) --* 

        The status of the account configuration. This contains the ``ConfigurationState``. If there is an error, it also contains the ``ErrorDetails``.

        
        

        - **state** *(string) --* 

          The current state of the configuration.

          
        

        - **error** *(dict) --* 

          Contains associated error information, if any.

          
          

          - **code** *(string) --* 

            The error code.

            
          

          - **message** *(string) --* 

            The error message.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`IoTSiteWise.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`IoTSiteWise.Client.exceptions.InternalFailureException`

  
  *   :py:class:`IoTSiteWise.Client.exceptions.ThrottlingException`

  
  *   :py:class:`IoTSiteWise.Client.exceptions.LimitExceededException`

  
  *   :py:class:`IoTSiteWise.Client.exceptions.ConflictingOperationException`

  