:doc:`PcaConnectorAd <../../pca-connector-ad>` / Client / list_service_principal_names

****************************
list_service_principal_names
****************************



.. py:method:: PcaConnectorAd.Client.list_service_principal_names(**kwargs)

  

  Lists the service principal names that the connector uses to authenticate with Active Directory.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/pca-connector-ad-2018-05-10/ListServicePrincipalNames>`_  


  **Request Syntax**
  ::

    response = client.list_service_principal_names(
        DirectoryRegistrationArn='string',
        MaxResults=123,
        NextToken='string'
    )
    
  :type DirectoryRegistrationArn: string
  :param DirectoryRegistrationArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) that was returned when you called `CreateDirectoryRegistration <https://docs.aws.amazon.com/pca-connector-ad/latest/APIReference/API_CreateDirectoryRegistration.html>`__.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    Use this parameter when paginating results to specify the maximum number of items to return in the response on each page. If additional items exist beyond the number you specify, the ``NextToken`` element is sent in the response. Use this ``NextToken`` value in a subsequent request to retrieve additional items.

    

  
  :type NextToken: string
  :param NextToken: 

    Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the ``NextToken`` parameter from the response you just received.

    

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

    
    ::

      {
          'NextToken': 'string',
          'ServicePrincipalNames': [
              {
                  'ConnectorArn': 'string',
                  'CreatedAt': datetime(2015, 1, 1),
                  'DirectoryRegistrationArn': 'string',
                  'Status': 'CREATING'|'ACTIVE'|'DELETING'|'FAILED',
                  'StatusReason': 'DIRECTORY_ACCESS_DENIED'|'DIRECTORY_NOT_REACHABLE'|'DIRECTORY_RESOURCE_NOT_FOUND'|'SPN_EXISTS_ON_DIFFERENT_AD_OBJECT'|'SPN_LIMIT_EXCEEDED'|'INTERNAL_FAILURE',
                  'UpdatedAt': datetime(2015, 1, 1)
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the ``NextToken`` parameter from the response you just received.

        
      

      - **ServicePrincipalNames** *(list) --* 

        The service principal name, if any, that the connector uses to authenticate with Active Directory.

        
        

        - *(dict) --* 

          The service principal name that the connector uses to authenticate with Active Directory.

          
          

          - **ConnectorArn** *(string) --* 

            The Amazon Resource Name (ARN) that was returned when you called `CreateConnector <https://docs.aws.amazon.com/pca-connector-ad/latest/APIReference/API_CreateConnector.html>`__.

            
          

          - **CreatedAt** *(datetime) --* 

            The date and time that the service principal name was created.

            
          

          - **DirectoryRegistrationArn** *(string) --* 

            The Amazon Resource Name (ARN) that was returned when you called `CreateDirectoryRegistration <https://docs.aws.amazon.com/pca-connector-ad/latest/APIReference/API_CreateDirectoryRegistration.html>`__.

            
          

          - **Status** *(string) --* 

            The status of a service principal name.

            
          

          - **StatusReason** *(string) --* 

            Additional information for the status of a service principal name if the status is failed.

            
          

          - **UpdatedAt** *(datetime) --* 

            Time when the service principal name was updated.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`PcaConnectorAd.Client.exceptions.AccessDeniedException`

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

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

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

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

  