:doc:`GreengrassV2 <../../greengrassv2>` / Client / get_service_role_for_account

****************************
get_service_role_for_account
****************************



.. py:method:: GreengrassV2.Client.get_service_role_for_account()

  

  Gets the service role associated with IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region. IoT Greengrass uses this role to verify the identity of client devices and manage core device connectivity information. For more information, see `Greengrass service role <https://docs.aws.amazon.com/greengrass/v2/developerguide/greengrass-service-role.html>`__ in the *IoT Greengrass Version 2 Developer Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/greengrassv2-2020-11-30/GetServiceRoleForAccount>`_  


  **Request Syntax**
  ::

    response = client.get_service_role_for_account()
    
    
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'associatedAt': 'string',
          'roleArn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **associatedAt** *(string) --* 

        The time when the service role was associated with IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region.

        
      

      - **roleArn** *(string) --* 

        The ARN of the service role that is associated with IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region.

        
  
  **Exceptions**
  
  *   :py:class:`GreengrassV2.Client.exceptions.InternalServerException`

  