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

**************************
get_service_principal_name
**************************



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

  

  Lists the service principal name 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/GetServicePrincipalName>`_  


  **Request Syntax**
  ::

    response = client.get_service_principal_name(
        ConnectorArn='string',
        DirectoryRegistrationArn='string'
    )
    
  :type ConnectorArn: string
  :param ConnectorArn: **[REQUIRED]** 

    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>`__.

    

  
  :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>`__.

    

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

    
    ::

      {
          'ServicePrincipalName': {
              '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) --* 
      

      - **ServicePrincipalName** *(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.html <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) --* 

          The date and time that 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`

  