:doc:`Transfer <../../transfer>` / Client / list_servers

************
list_servers
************



.. py:method:: Transfer.Client.list_servers(**kwargs)

  

  Lists the file transfer protocol-enabled servers that are associated with your Amazon Web Services account.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListServers>`_  


  **Request Syntax**
  ::

    response = client.list_servers(
        MaxResults=123,
        NextToken='string'
    )
    
  :type MaxResults: integer
  :param MaxResults: 

    Specifies the number of servers to return as a response to the ``ListServers`` query.

    

  
  :type NextToken: string
  :param NextToken: 

    When additional results are obtained from the ``ListServers`` command, a ``NextToken`` parameter is returned in the output. You can then pass the ``NextToken`` parameter in a subsequent command to continue listing additional servers.

    

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

    
    ::

      {
          'NextToken': 'string',
          'Servers': [
              {
                  'Arn': 'string',
                  'Domain': 'S3'|'EFS',
                  'IdentityProviderType': 'SERVICE_MANAGED'|'API_GATEWAY'|'AWS_DIRECTORY_SERVICE'|'AWS_LAMBDA',
                  'EndpointType': 'PUBLIC'|'VPC'|'VPC_ENDPOINT',
                  'LoggingRole': 'string',
                  'ServerId': 'string',
                  'State': 'OFFLINE'|'ONLINE'|'STARTING'|'STOPPING'|'START_FAILED'|'STOP_FAILED',
                  'UserCount': 123
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **NextToken** *(string) --* 

        When you can get additional results from the ``ListServers`` operation, a ``NextToken`` parameter is returned in the output. In a following command, you can pass in the ``NextToken`` parameter to continue listing additional servers.

        
      

      - **Servers** *(list) --* 

        An array of servers that were listed.

        
        

        - *(dict) --* 

          Returns properties of a file transfer protocol-enabled server that was specified.

          
          

          - **Arn** *(string) --* 

            Specifies the unique Amazon Resource Name (ARN) for a server to be listed.

            
          

          - **Domain** *(string) --* 

            Specifies the domain of the storage system that is used for file transfers. There are two domains available: Amazon Simple Storage Service (Amazon S3) and Amazon Elastic File System (Amazon EFS). The default value is S3.

            
          

          - **IdentityProviderType** *(string) --* 

            The mode of authentication for a server. The default value is ``SERVICE_MANAGED``, which allows you to store and access user credentials within the Transfer Family service.

             

            Use ``AWS_DIRECTORY_SERVICE`` to provide access to Active Directory groups in Directory Service for Microsoft Active Directory or Microsoft Active Directory in your on-premises environment or in Amazon Web Services using AD Connector. This option also requires you to provide a Directory ID by using the ``IdentityProviderDetails`` parameter.

             

            Use the ``API_GATEWAY`` value to integrate with an identity provider of your choosing. The ``API_GATEWAY`` setting requires you to provide an Amazon API Gateway endpoint URL to call for authentication by using the ``IdentityProviderDetails`` parameter.

             

            Use the ``AWS_LAMBDA`` value to directly use an Lambda function as your identity provider. If you choose this value, you must specify the ARN for the Lambda function in the ``Function`` parameter for the ``IdentityProviderDetails`` data type.

            
          

          - **EndpointType** *(string) --* 

            Specifies the type of VPC endpoint that your server is connected to. If your server is connected to a VPC endpoint, your server isn't accessible over the public internet.

            
          

          - **LoggingRole** *(string) --* 

            The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that allows a server to turn on Amazon CloudWatch logging for Amazon S3 or Amazon EFS events. When set, you can view user activity in your CloudWatch logs.

            
          

          - **ServerId** *(string) --* 

            Specifies the unique system assigned identifier for the servers that were listed.

            
          

          - **State** *(string) --* 

            The condition of the server that was described. A value of ``ONLINE`` indicates that the server can accept jobs and transfer files. A ``State`` value of ``OFFLINE`` means that the server cannot perform file transfer operations.

             

            The states of ``STARTING`` and ``STOPPING`` indicate that the server is in an intermediate state, either not fully able to respond, or not fully offline. The values of ``START_FAILED`` or ``STOP_FAILED`` can indicate an error condition.

            
          

          - **UserCount** *(integer) --* 

            Specifies the number of users that are assigned to a server you specified with the ``ServerId``.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`Transfer.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`Transfer.Client.exceptions.InternalServiceError`

  
  *   :py:class:`Transfer.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`Transfer.Client.exceptions.InvalidNextTokenException`

  