:doc:`ECR <../../ecr>` / Client / put_image_scanning_configuration

********************************
put_image_scanning_configuration
********************************



.. py:method:: ECR.Client.put_image_scanning_configuration(**kwargs)

  

  .. warning::

    

    The ``PutImageScanningConfiguration`` API is being deprecated, in favor of specifying the image scanning configuration at the registry level. For more information, see  PutRegistryScanningConfiguration.

     

   

  Updates the image scanning configuration for the specified repository.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImageScanningConfiguration>`_  


  **Request Syntax**
  ::

    response = client.put_image_scanning_configuration(
        registryId='string',
        repositoryName='string',
        imageScanningConfiguration={
            'scanOnPush': True|False
        }
    )
    
  :type registryId: string
  :param registryId: 

    The Amazon Web Services account ID associated with the registry that contains the repository in which to update the image scanning configuration setting. If you do not specify a registry, the default registry is assumed.

    

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

    The name of the repository in which to update the image scanning configuration setting.

    

  
  :type imageScanningConfiguration: dict
  :param imageScanningConfiguration: **[REQUIRED]** 

    The image scanning configuration for the repository. This setting determines whether images are scanned for known vulnerabilities after being pushed to the repository.

    

  
    - **scanOnPush** *(boolean) --* 

      The setting that determines whether images are scanned after being pushed to a repository. If set to ``true``, images will be scanned after being pushed. If this parameter is not specified, it will default to ``false`` and images will not be scanned unless a scan is manually started with the `API_StartImageScan <https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_StartImageScan.html>`__ API.

      

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

    
    ::

      {
          'registryId': 'string',
          'repositoryName': 'string',
          'imageScanningConfiguration': {
              'scanOnPush': True|False
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **registryId** *(string) --* 

        The registry ID associated with the request.

        
      

      - **repositoryName** *(string) --* 

        The repository name associated with the request.

        
      

      - **imageScanningConfiguration** *(dict) --* 

        The image scanning configuration setting for the repository.

        
        

        - **scanOnPush** *(boolean) --* 

          The setting that determines whether images are scanned after being pushed to a repository. If set to ``true``, images will be scanned after being pushed. If this parameter is not specified, it will default to ``false`` and images will not be scanned unless a scan is manually started with the `API_StartImageScan <https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_StartImageScan.html>`__ API.

          
    
  
  **Exceptions**
  
  *   :py:class:`ECR.Client.exceptions.ServerException`

  
  *   :py:class:`ECR.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`ECR.Client.exceptions.RepositoryNotFoundException`

  
  *   :py:class:`ECR.Client.exceptions.ValidationException`

  