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

***************************
list_remote_access_sessions
***************************



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

  

  Returns a list of all currently running remote access sessions.

  

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


  **Request Syntax**
  ::

    response = client.list_remote_access_sessions(
        arn='string',
        nextToken='string'
    )
    
  :type arn: string
  :param arn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the project about which you are requesting information.

    

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

    
    ::

      {
          'remoteAccessSessions': [
              {
                  'arn': 'string',
                  'name': 'string',
                  'created': datetime(2015, 1, 1),
                  'status': 'PENDING'|'PENDING_CONCURRENCY'|'PENDING_DEVICE'|'PROCESSING'|'SCHEDULING'|'PREPARING'|'RUNNING'|'COMPLETED'|'STOPPING',
                  'result': 'PENDING'|'PASSED'|'WARNED'|'FAILED'|'SKIPPED'|'ERRORED'|'STOPPED',
                  'message': 'string',
                  'started': datetime(2015, 1, 1),
                  'stopped': datetime(2015, 1, 1),
                  'device': {
                      'arn': 'string',
                      'name': 'string',
                      'manufacturer': 'string',
                      'model': 'string',
                      'modelId': 'string',
                      'formFactor': 'PHONE'|'TABLET',
                      'platform': 'ANDROID'|'IOS',
                      'os': 'string',
                      'cpu': {
                          'frequency': 'string',
                          'architecture': 'string',
                          'clock': 123.0
                      },
                      'resolution': {
                          'width': 123,
                          'height': 123
                      },
                      'heapSize': 123,
                      'memory': 123,
                      'image': 'string',
                      'carrier': 'string',
                      'radio': 'string',
                      'remoteAccessEnabled': True|False,
                      'remoteDebugEnabled': True|False,
                      'fleetType': 'string',
                      'fleetName': 'string',
                      'instances': [
                          {
                              'arn': 'string',
                              'deviceArn': 'string',
                              'labels': [
                                  'string',
                              ],
                              'status': 'IN_USE'|'PREPARING'|'AVAILABLE'|'NOT_AVAILABLE',
                              'udid': 'string',
                              'instanceProfile': {
                                  'arn': 'string',
                                  'packageCleanup': True|False,
                                  'excludeAppPackagesFromCleanup': [
                                      'string',
                                  ],
                                  'rebootAfterUse': True|False,
                                  'name': 'string',
                                  'description': 'string'
                              }
                          },
                      ],
                      'availability': 'TEMPORARY_NOT_AVAILABLE'|'BUSY'|'AVAILABLE'|'HIGHLY_AVAILABLE'
                  },
                  'instanceArn': 'string',
                  'billingMethod': 'METERED'|'UNMETERED',
                  'deviceMinutes': {
                      'total': 123.0,
                      'metered': 123.0,
                      'unmetered': 123.0
                  },
                  'endpoint': 'string',
                  'deviceUdid': 'string',
                  'interactionMode': 'INTERACTIVE'|'NO_VIDEO'|'VIDEO_ONLY',
                  'skipAppResign': True|False,
                  'vpcConfig': {
                      'securityGroupIds': [
                          'string',
                      ],
                      'subnetIds': [
                          'string',
                      ],
                      'vpcId': 'string'
                  },
                  'deviceProxy': {
                      'host': 'string',
                      'port': 123
                  },
                  'appUpload': 'string',
                  'endpoints': {
                      'remoteDriverEndpoint': 'string',
                      'interactiveEndpoint': 'string'
                  }
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Represents the response from the server after AWS Device Farm makes a request to return information about the remote access session.

      
      

      - **remoteAccessSessions** *(list) --* 

        A container that represents the metadata from the service about each remote access session you are requesting.

        
        

        - *(dict) --* 

          Represents information about the remote access session.

          
          

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

            The Amazon Resource Name (ARN) of the remote access session.

            
          

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

            The name of the remote access session.

            
          

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

            The date and time the remote access session was created.

            
          

          - **status** *(string) --* 

            The status of the remote access session. Can be any of the following:

             

            
            * PENDING.
             
            * PENDING_CONCURRENCY.
             
            * PENDING_DEVICE.
             
            * PROCESSING.
             
            * SCHEDULING.
             
            * PREPARING.
             
            * RUNNING.
             
            * COMPLETED.
             
            * STOPPING.
            

            
          

          - **result** *(string) --* 

            The result of the remote access session. Can be any of the following:

             

            
            * PENDING.
             
            * PASSED.
             
            * WARNED.
             
            * FAILED.
             
            * SKIPPED.
             
            * ERRORED.
             
            * STOPPED.
            

            
          

          - **message** *(string) --* 

            A message about the remote access session.

            
          

          - **started** *(datetime) --* 

            The date and time the remote access session was started.

            
          

          - **stopped** *(datetime) --* 

            The date and time the remote access session was stopped.

            
          

          - **device** *(dict) --* 

            The device (phone or tablet) used in the remote access session.

            
            

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

              The device's ARN.

              
            

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

              The device's display name.

              
            

            - **manufacturer** *(string) --* 

              The device's manufacturer name.

              
            

            - **model** *(string) --* 

              The device's model name.

              
            

            - **modelId** *(string) --* 

              The device's model ID.

              
            

            - **formFactor** *(string) --* 

              The device's form factor.

               

              Allowed values include:

               

              
              * PHONE
               
              * TABLET
              

              
            

            - **platform** *(string) --* 

              The device's platform.

               

              Allowed values include:

               

              
              * ANDROID
               
              * IOS
              

              
            

            - **os** *(string) --* 

              The device's operating system type.

              
            

            - **cpu** *(dict) --* 

              Information about the device's CPU.

              
              

              - **frequency** *(string) --* 

                The CPU's frequency.

                
              

              - **architecture** *(string) --* 

                The CPU's architecture (for example, x86 or ARM).

                
              

              - **clock** *(float) --* 

                The clock speed of the device's CPU, expressed in hertz (Hz). For example, a 1.2 GHz CPU is expressed as 1200000000.

                
          
            

            - **resolution** *(dict) --* 

              The resolution of the device.

              
              

              - **width** *(integer) --* 

                The screen resolution's width, expressed in pixels.

                
              

              - **height** *(integer) --* 

                The screen resolution's height, expressed in pixels.

                
          
            

            - **heapSize** *(integer) --* 

              The device's heap size, expressed in bytes.

              
            

            - **memory** *(integer) --* 

              The device's total memory size, expressed in bytes.

              
            

            - **image** *(string) --* 

              The device's image name.

              
            

            - **carrier** *(string) --* 

              The device's carrier.

              
            

            - **radio** *(string) --* 

              The device's radio.

              
            

            - **remoteAccessEnabled** *(boolean) --* 

              Specifies whether remote access has been enabled for the specified device.

              
            

            - **remoteDebugEnabled** *(boolean) --* 

              This flag is set to ``true`` if remote debugging is enabled for the device.

               

              Remote debugging is `no longer supported <https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html>`__.

              
            

            - **fleetType** *(string) --* 

              The type of fleet to which this device belongs. Possible values are PRIVATE and PUBLIC.

              
            

            - **fleetName** *(string) --* 

              The name of the fleet to which this device belongs.

              
            

            - **instances** *(list) --* 

              The instances that belong to this device.

              
              

              - *(dict) --* 

                Represents the device instance.

                
                

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

                  The Amazon Resource Name (ARN) of the device instance.

                  
                

                - **deviceArn** *(string) --* 

                  The ARN of the device.

                  
                

                - **labels** *(list) --* 

                  An array of strings that describe the device instance.

                  
                  

                  - *(string) --* 
              
                

                - **status** *(string) --* 

                  The status of the device instance. Valid values are listed here.

                  
                

                - **udid** *(string) --* 

                  Unique device identifier for the device instance.

                  
                

                - **instanceProfile** *(dict) --* 

                  A object that contains information about the instance profile.

                  
                  

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

                    The Amazon Resource Name (ARN) of the instance profile.

                    
                  

                  - **packageCleanup** *(boolean) --* 

                    When set to ``true``, Device Farm removes app packages after a test run. The default value is ``false`` for private devices.

                    
                  

                  - **excludeAppPackagesFromCleanup** *(list) --* 

                    An array of strings containing the list of app packages that should not be cleaned up from the device after a test run completes.

                     

                    The list of packages is considered only if you set ``packageCleanup`` to ``true``.

                    
                    

                    - *(string) --* 
                
                  

                  - **rebootAfterUse** *(boolean) --* 

                    When set to ``true``, Device Farm reboots the instance after a test run. The default value is ``true``.

                    
                  

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

                    The name of the instance profile.

                    
                  

                  - **description** *(string) --* 

                    The description of the instance profile.

                    
              
            
          
            

            - **availability** *(string) --* 

              Indicates how likely a device is available for a test run. Currently available in the  ListDevices and GetDevice API methods.

              
        
          

          - **instanceArn** *(string) --* 

            The ARN of the instance.

            
          

          - **billingMethod** *(string) --* 

            The billing method of the remote access session. Possible values include ``METERED`` or ``UNMETERED``. For more information about metered devices, see `AWS Device Farm terminology <https://docs.aws.amazon.com/devicefarm/latest/developerguide/welcome.html#welcome-terminology>`__.

            
          

          - **deviceMinutes** *(dict) --* 

            The number of minutes a device is used in a remote access session (including setup and teardown minutes).

            
            

            - **total** *(float) --* 

              When specified, represents the total minutes used by the resource to run tests.

              
            

            - **metered** *(float) --* 

              When specified, represents only the sum of metered minutes used by the resource to run tests.

              
            

            - **unmetered** *(float) --* 

              When specified, represents only the sum of unmetered minutes used by the resource to run tests.

              
        
          

          - **endpoint** *(string) --* 

            The endpoint for the remote access session. This field is deprecated, and is replaced by the new ``endpoints.interactiveEndpoint`` field.

            
          

          - **deviceUdid** *(string) --* 

            Unique device identifier for the remote device. Only returned if remote debugging is enabled for the remote access session.

             

            Remote debugging is `no longer supported <https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html>`__.

            
          

          - **interactionMode** *(string) --* 

            The interaction mode of the remote access session. Changing the interactive mode of remote access sessions is no longer available.

            
          

          - **skipAppResign** *(boolean) --* 

            When set to ``true``, for private devices, Device Farm does not sign your app again. For public devices, Device Farm always signs your apps again.

             

            For more information about how Device Farm re-signs your apps, see `Do you modify my app? <http://aws.amazon.com/device-farm/faqs/>`__ in the *AWS Device Farm FAQs*.

            
          

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

              
        
          

          - **deviceProxy** *(dict) --* 

            The device proxy configured for the remote access session.

            
            

            - **host** *(string) --* 

              Hostname or IPv4 address of the proxy.

              
            

            - **port** *(integer) --* 

              The port number on which the http/s proxy is listening.

              
        
          

          - **appUpload** *(string) --* 

            The ARN for the app to be installed onto your device.

            
          

          - **endpoints** *(dict) --* 

            Represents the remote endpoints for viewing and controlling a device during a remote access session.

            
            

            - **remoteDriverEndpoint** *(string) --* 

              URL for controlling the device using WebDriver-compliant clients, like Appium, during the remote access session.

              
            

            - **interactiveEndpoint** *(string) --* 

              URL for viewing and interacting with the device during the remote access session.

              
        
      
    
      

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

        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.

        
  
  **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 a specific Device Farm remote access session.
  ::

    response = client.list_remote_access_sessions(
        # You can get the Amazon Resource Name (ARN) of the session by using the list-sessions CLI command.
        arn='arn:aws:devicefarm:us-west-2:123456789101:session:EXAMPLE-GUID-123-456',
        # A dynamically generated value, used for paginating results.
        nextToken='RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE=',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'remoteAccessSessions': [
        ],
        'ResponseMetadata': {
            '...': '...',
        },
    }

  