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

************************************************
batch_associate_code_security_scan_configuration
************************************************



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

  

  Associates multiple code repositories with an Amazon Inspector code security scan configuration.

  

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


  **Request Syntax**
  ::

    response = client.batch_associate_code_security_scan_configuration(
        associateConfigurationRequests=[
            {
                'scanConfigurationArn': 'string',
                'resource': {
                    'projectId': 'string'
                }
            },
        ]
    )
    
  :type associateConfigurationRequests: list
  :param associateConfigurationRequests: **[REQUIRED]** 

    A list of code repositories to associate with the specified scan configuration.

    

  
    - *(dict) --* 

      Contains details about a request to associate a code repository with a scan configuration.

      

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

        The Amazon Resource Name (ARN) of the scan configuration.

        

      
      - **resource** *(dict) --* **[REQUIRED]** 

        Identifies a specific resource in a code repository that will be scanned.

        .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``projectId``. 

      
        - **projectId** *(string) --* 

          The unique identifier of the project in the code repository.

          

        
      
    

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

    
    ::

      {
          'failedAssociations': [
              {
                  'scanConfigurationArn': 'string',
                  'resource': {
                      'projectId': 'string'
                  },
                  'statusCode': 'INTERNAL_ERROR'|'ACCESS_DENIED'|'SCAN_CONFIGURATION_NOT_FOUND'|'INVALID_INPUT'|'RESOURCE_NOT_FOUND'|'QUOTA_EXCEEDED',
                  'statusMessage': 'string'
              },
          ],
          'successfulAssociations': [
              {
                  'scanConfigurationArn': 'string',
                  'resource': {
                      'projectId': 'string'
                  }
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **failedAssociations** *(list) --* 

        Details of any code repositories that failed to be associated with the scan configuration.

        
        

        - *(dict) --* 

          Details about a failed attempt to associate or disassociate a code repository with a scan configuration.

          
          

          - **scanConfigurationArn** *(string) --* 

            The Amazon Resource Name (ARN) of the scan configuration that failed to be associated or disassociated.

            
          

          - **resource** *(dict) --* 

            Identifies a specific resource in a code repository that will be scanned.

            .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``projectId``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


          
            

            - **projectId** *(string) --* 

              The unique identifier of the project in the code repository.

              
        
          

          - **statusCode** *(string) --* 

            The status code indicating why the association or disassociation failed.

            
          

          - **statusMessage** *(string) --* 

            A message explaining why the association or disassociation failed.

            
      
    
      

      - **successfulAssociations** *(list) --* 

        Details of code repositories that were successfully associated with the scan configuration.

        
        

        - *(dict) --* 

          Details about a successful association or disassociation between a code repository and a scan configuration.

          
          

          - **scanConfigurationArn** *(string) --* 

            The Amazon Resource Name (ARN) of the scan configuration that was successfully associated or disassociated.

            
          

          - **resource** *(dict) --* 

            Identifies a specific resource in a code repository that will be scanned.

            .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``projectId``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


          
            

            - **projectId** *(string) --* 

              The unique identifier of the project in the code repository.

              
        
      
    
  
  **Exceptions**
  
  *   :py:class:`Inspector2.Client.exceptions.ConflictException`

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

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

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

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

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

  