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

******************
get_encryption_key
******************



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

  

  Gets an encryption key.

  

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


  **Request Syntax**
  ::

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

    The scan type the key encrypts.

    

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

    The resource type the key encrypts.

    

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

    
    ::

      {
          'kmsKeyId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **kmsKeyId** *(string) --* 

        A kms key ID.

        
  
  **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`

  