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

***********************************
put_registry_scanning_configuration
***********************************



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

  

  Creates or updates the scanning configuration for your private registry.

  

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


  **Request Syntax**
  ::

    response = client.put_registry_scanning_configuration(
        scanType='BASIC'|'ENHANCED',
        rules=[
            {
                'scanFrequency': 'SCAN_ON_PUSH'|'CONTINUOUS_SCAN'|'MANUAL',
                'repositoryFilters': [
                    {
                        'filter': 'string',
                        'filterType': 'WILDCARD'
                    },
                ]
            },
        ]
    )
    
  :type scanType: string
  :param scanType: 

    The scanning type to set for the registry.

     

    When a registry scanning configuration is not defined, by default the ``BASIC`` scan type is used. When basic scanning is used, you may specify filters to determine which individual repositories, or all repositories, are scanned when new images are pushed to those repositories. Alternatively, you can do manual scans of images with basic scanning.

     

    When the ``ENHANCED`` scan type is set, Amazon Inspector provides automated vulnerability scanning. You may choose between continuous scanning or scan on push and you may specify filters to determine which individual repositories, or all repositories, are scanned.

    

  
  :type rules: list
  :param rules: 

    The scanning rules to use for the registry. A scanning rule is used to determine which repository filters are used and at what frequency scanning will occur.

    

  
    - *(dict) --* 

      The details of a scanning rule for a private registry.

      

    
      - **scanFrequency** *(string) --* **[REQUIRED]** 

        The frequency that scans are performed at for a private registry. When the ``ENHANCED`` scan type is specified, the supported scan frequencies are ``CONTINUOUS_SCAN`` and ``SCAN_ON_PUSH``. When the ``BASIC`` scan type is specified, the ``SCAN_ON_PUSH`` scan frequency is supported. If scan on push is not specified, then the ``MANUAL`` scan frequency is set by default.

        

      
      - **repositoryFilters** *(list) --* **[REQUIRED]** 

        The repository filters associated with the scanning configuration for a private registry.

        

      
        - *(dict) --* 

          The details of a scanning repository filter. For more information on how to use filters, see `Using filters <https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html#image-scanning-filters>`__ in the *Amazon Elastic Container Registry User Guide*.

          

        
          - **filter** *(string) --* **[REQUIRED]** 

            The filter to use when scanning.

            

          
          - **filterType** *(string) --* **[REQUIRED]** 

            The type associated with the filter.

            

          
        
    
    

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

    
    ::

      {
          'registryScanningConfiguration': {
              'scanType': 'BASIC'|'ENHANCED',
              'rules': [
                  {
                      'scanFrequency': 'SCAN_ON_PUSH'|'CONTINUOUS_SCAN'|'MANUAL',
                      'repositoryFilters': [
                          {
                              'filter': 'string',
                              'filterType': 'WILDCARD'
                          },
                      ]
                  },
              ]
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **registryScanningConfiguration** *(dict) --* 

        The scanning configuration for your registry.

        
        

        - **scanType** *(string) --* 

          The type of scanning configured for the registry.

          
        

        - **rules** *(list) --* 

          The scanning rules associated with the registry.

          
          

          - *(dict) --* 

            The details of a scanning rule for a private registry.

            
            

            - **scanFrequency** *(string) --* 

              The frequency that scans are performed at for a private registry. When the ``ENHANCED`` scan type is specified, the supported scan frequencies are ``CONTINUOUS_SCAN`` and ``SCAN_ON_PUSH``. When the ``BASIC`` scan type is specified, the ``SCAN_ON_PUSH`` scan frequency is supported. If scan on push is not specified, then the ``MANUAL`` scan frequency is set by default.

              
            

            - **repositoryFilters** *(list) --* 

              The repository filters associated with the scanning configuration for a private registry.

              
              

              - *(dict) --* 

                The details of a scanning repository filter. For more information on how to use filters, see `Using filters <https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html#image-scanning-filters>`__ in the *Amazon Elastic Container Registry User Guide*.

                
                

                - **filter** *(string) --* 

                  The filter to use when scanning.

                  
                

                - **filterType** *(string) --* 

                  The type associated with the filter.

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

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

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

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

  