:doc:`Greengrass <../../greengrass>` / Client / associate_role_to_group

***********************
associate_role_to_group
***********************



.. py:method:: Greengrass.Client.associate_role_to_group(**kwargs)

  Associates a role with a group. Your Greengrass core will use the role to access AWS cloud services. The role's permissions should allow Greengrass core Lambda functions to perform actions against the cloud.

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/AssociateRoleToGroup>`_  


  **Request Syntax**
  ::

    response = client.associate_role_to_group(
        GroupId='string',
        RoleArn='string'
    )
    
  :type GroupId: string
  :param GroupId: **[REQUIRED]** The ID of the Greengrass group.

  
  :type RoleArn: string
  :param RoleArn: **[REQUIRED]** The ARN of the role you wish to associate with this group. The existence of the role is not validated.

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

    
    ::

      {
          'AssociatedAt': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* success
      

      - **AssociatedAt** *(string) --* The time, in milliseconds since the epoch, when the role ARN was associated with the group.
  
  **Exceptions**
  
  *   :py:class:`Greengrass.Client.exceptions.BadRequestException`

  
  *   :py:class:`Greengrass.Client.exceptions.InternalServerErrorException`

  