:doc:`Inspector2 <../../inspector2>` / Client / update_encryption_key

*********************
update_encryption_key
*********************



.. py:method:: Inspector2.Client.update_encryption_key(**kwargs)

  

  Updates an encryption key. A ``ResourceNotFoundException`` means that an Amazon Web Services owned key is being used for encryption.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/inspector2-2020-06-08/UpdateEncryptionKey>`_  


  **Request Syntax**
  ::

    response = client.update_encryption_key(
        kmsKeyId='string',
        scanType='NETWORK'|'PACKAGE'|'CODE',
        resourceType='AWS_EC2_INSTANCE'|'AWS_ECR_CONTAINER_IMAGE'|'AWS_ECR_REPOSITORY'|'AWS_LAMBDA_FUNCTION'|'CODE_REPOSITORY'
    )
    
  :type kmsKeyId: string
  :param kmsKeyId: **[REQUIRED]** 

    A KMS key ID for the encryption key.

    

  
  :type scanType: string
  :param scanType: **[REQUIRED]** 

    The scan type for the encryption key.

    

  
  :type resourceType: string
  :param resourceType: **[REQUIRED]** 

    The resource type for the encryption key.

    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`Inspector2.Client.exceptions.ValidationException`

  
  *   :py:class:`Inspector2.Client.exceptions.AccessDeniedException`

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

  
  *   :py:class:`Inspector2.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`Inspector2.Client.exceptions.InternalServerException`

  