:doc:`DeviceFarm <../../devicefarm>` / Client / list_projects

*************
list_projects
*************



.. py:method:: DeviceFarm.Client.list_projects(**kwargs)

  

  Gets information about projects.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/ListProjects>`_  


  **Request Syntax**
  ::

    response = client.list_projects(
        arn='string',
        nextToken='string'
    )
    
  :type arn: string
  :param arn: 

    Optional. If no Amazon Resource Name (ARN) is specified, then AWS Device Farm returns a list of all projects for the AWS account. You can also specify a project ARN.

    

  
  :type nextToken: string
  :param nextToken: 

    An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

    

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

    
    ::

      {
          'projects': [
              {
                  'arn': 'string',
                  'name': 'string',
                  'defaultJobTimeoutMinutes': 123,
                  'created': datetime(2015, 1, 1),
                  'vpcConfig': {
                      'securityGroupIds': [
                          'string',
                      ],
                      'subnetIds': [
                          'string',
                      ],
                      'vpcId': 'string'
                  },
                  'environmentVariables': [
                      {
                          'name': 'string',
                          'value': 'string'
                      },
                  ],
                  'executionRoleArn': 'string'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Represents the result of a list projects request.

      
      

      - **projects** *(list) --* 

        Information about the projects.

        
        

        - *(dict) --* 

          Represents an operating-system neutral workspace for running and managing tests.

          
          

          - **arn** *(string) --* 

            The project's ARN.

            
          

          - **name** *(string) --* 

            The project's name.

            
          

          - **defaultJobTimeoutMinutes** *(integer) --* 

            The default number of minutes (at the project level) a test run executes before it times out. The default value is 150 minutes.

            
          

          - **created** *(datetime) --* 

            When the project was created.

            
          

          - **vpcConfig** *(dict) --* 

            The VPC security groups and subnets that are attached to a project.

            
            

            - **securityGroupIds** *(list) --* 

              An array of one or more security groups IDs in your Amazon VPC.

              
              

              - *(string) --* 
          
            

            - **subnetIds** *(list) --* 

              An array of one or more subnet IDs in your Amazon VPC.

              
              

              - *(string) --* 
          
            

            - **vpcId** *(string) --* 

              The ID of the Amazon VPC.

              
        
          

          - **environmentVariables** *(list) --* 

            Environment variables associated with the project.

            
            

            - *(dict) --* 

              Information about an environment variable for a project or a run.

              
              

              - **name** *(string) --* 

                The name of the environment variable.

                
              

              - **value** *(string) --* 

                The value of the environment variable.

                
          
        
          

          - **executionRoleArn** *(string) --* 

            The IAM execution role associated with the project.

            
      
    
      

      - **nextToken** *(string) --* 

        If the number of items that are returned is significantly large, this is an identifier that is also returned. It can be used in a subsequent call to this operation to return the next set of items in the list.

        
  
  **Exceptions**
  
  *   :py:class:`DeviceFarm.Client.exceptions.ArgumentException`

  
  *   :py:class:`DeviceFarm.Client.exceptions.NotFoundException`

  
  *   :py:class:`DeviceFarm.Client.exceptions.LimitExceededException`

  
  *   :py:class:`DeviceFarm.Client.exceptions.ServiceAccountException`

  

  **Examples**

  The following example returns information about the specified project in Device Farm.
  ::

    response = client.list_projects(
        arn='arn:aws:devicefarm:us-west-2:123456789101:project:7ad300ed-8183-41a7-bf94-12345EXAMPLE',
        # A dynamically generated value, used for paginating results.
        nextToken='RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'projects': [
            {
                'name': 'My Test Project',
                'arn': 'arn:aws:devicefarm:us-west-2:123456789101:project:7ad300ed-8183-41a7-bf94-12345EXAMPLE',
                'created': datetime(2016, 1, 19, 0, 27, 42, 1, 19, 0),
            },
            {
                'name': 'Hello World',
                'arn': 'arn:aws:devicefarm:us-west-2:123456789101:project:d6b087d9-56db-4e44-b9ec-12345EXAMPLE',
                'created': datetime(2016, 8, 4, 22, 35, 12, 3, 217, 0),
            },
        ],
        'ResponseMetadata': {
            '...': '...',
        },
    }

  