:doc:`RAM <../../ram>` / Client / get_resource_share_invitations

******************************
get_resource_share_invitations
******************************



.. py:method:: RAM.Client.get_resource_share_invitations(**kwargs)

  

  Retrieves details about invitations that you have received for resource shares.

   

  .. note::

    

    Always check the ``NextToken`` response parameter for a ``null`` value when calling a paginated operation. These operations can occasionally return an empty set of results even when there are more results available. The ``NextToken`` response parameter value is ``null`` *only* when there are no more results to display.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourceShareInvitations>`_  


  **Request Syntax**
  ::

    response = client.get_resource_share_invitations(
        resourceShareInvitationArns=[
            'string',
        ],
        resourceShareArns=[
            'string',
        ],
        nextToken='string',
        maxResults=123
    )
    
  :type resourceShareInvitationArns: list
  :param resourceShareInvitationArns: 

    Specifies the `Amazon Resource Names (ARNs) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ of the resource share invitations you want information about.

    

  
    - *(string) --* 

    

  :type resourceShareArns: list
  :param resourceShareArns: 

    Specifies that you want details about invitations only for the resource shares described by this list of `Amazon Resource Names (ARNs) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__

    

  
    - *(string) --* 

    

  :type nextToken: string
  :param nextToken: 

    Specifies that you want to receive the next page of results. Valid only if you received a ``NextToken`` response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's ``NextToken`` response to request the next page of results.

    

  
  :type maxResults: integer
  :param maxResults: 

    Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the ``NextToken`` response element is returned with a value (not null). Include the specified value as the ``NextToken`` request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check ``NextToken`` after every operation to ensure that you receive all of the results.

    

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

    
    ::

      {
          'resourceShareInvitations': [
              {
                  'resourceShareInvitationArn': 'string',
                  'resourceShareName': 'string',
                  'resourceShareArn': 'string',
                  'senderAccountId': 'string',
                  'receiverAccountId': 'string',
                  'invitationTimestamp': datetime(2015, 1, 1),
                  'status': 'PENDING'|'ACCEPTED'|'REJECTED'|'EXPIRED',
                  'resourceShareAssociations': [
                      {
                          'resourceShareArn': 'string',
                          'resourceShareName': 'string',
                          'associatedEntity': 'string',
                          'associationType': 'PRINCIPAL'|'RESOURCE'|'SOURCE',
                          'status': 'ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED'|'SUSPENDED'|'SUSPENDING'|'RESTORING',
                          'statusMessage': 'string',
                          'creationTime': datetime(2015, 1, 1),
                          'lastUpdatedTime': datetime(2015, 1, 1),
                          'external': True|False
                      },
                  ],
                  'receiverArn': 'string'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **resourceShareInvitations** *(list) --* 

        An array of objects that contain the details about the invitations.

        
        

        - *(dict) --* 

          Describes an invitation for an Amazon Web Services account to join a resource share.

          
          

          - **resourceShareInvitationArn** *(string) --* 

            The `Amazon Resource Name (ARN) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ of the invitation.

            
          

          - **resourceShareName** *(string) --* 

            The name of the resource share.

            
          

          - **resourceShareArn** *(string) --* 

            The `Amazon Resource Name (ARN) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ of the resource share

            
          

          - **senderAccountId** *(string) --* 

            The ID of the Amazon Web Services account that sent the invitation.

            
          

          - **receiverAccountId** *(string) --* 

            The ID of the Amazon Web Services account that received the invitation.

            
          

          - **invitationTimestamp** *(datetime) --* 

            The date and time when the invitation was sent.

            
          

          - **status** *(string) --* 

            The current status of the invitation.

            
          

          - **resourceShareAssociations** *(list) --* 

            To view the resources associated with a pending resource share invitation, use  ListPendingInvitationResources.

            
            

            - *(dict) --* 

              Describes an association between a resource share and either a principal or a resource.

              
              

              - **resourceShareArn** *(string) --* 

                The `Amazon Resource Name (ARN) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ of the resource share.

                
              

              - **resourceShareName** *(string) --* 

                The name of the resource share.

                
              

              - **associatedEntity** *(string) --* 

                The associated entity. This can be either of the following:

                 

                
                * For a resource association, this is the `Amazon Resource Name (ARN) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ of the resource.
                 
                * For principal associations, this is one of the following: 

                  
                  * The ID of an Amazon Web Services account
                   
                  * The `Amazon Resource Name (ARN) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ of an organization in Organizations
                   
                  * The ARN of an organizational unit (OU) in Organizations
                   
                  * The ARN of an IAM role
                   
                  * The ARN of an IAM user
                  

                
                

                
              

              - **associationType** *(string) --* 

                The type of entity included in this association.

                
              

              - **status** *(string) --* 

                The current status of the association.

                
              

              - **statusMessage** *(string) --* 

                A message about the status of the association.

                
              

              - **creationTime** *(datetime) --* 

                The date and time when the association was created.

                
              

              - **lastUpdatedTime** *(datetime) --* 

                The date and time when the association was last updated.

                
              

              - **external** *(boolean) --* 

                Indicates whether the principal belongs to the same organization in Organizations as the Amazon Web Services account that owns the resource share.

                
          
        
          

          - **receiverArn** *(string) --* 

            The `Amazon Resource Name (ARN) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ of the IAM user or role that received the invitation.

            
      
    
      

      - **nextToken** *(string) --* 

        If present, this value indicates that more output is available than is included in the current response. Use this value in the ``NextToken`` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the ``NextToken`` response element comes back as ``null``. This indicates that this is the last page of results.

        
  
  **Exceptions**
  
  *   :py:class:`RAM.Client.exceptions.ResourceShareInvitationArnNotFoundException`

  
  *   :py:class:`RAM.Client.exceptions.InvalidMaxResultsException`

  
  *   :py:class:`RAM.Client.exceptions.MalformedArnException`

  
  *   :py:class:`RAM.Client.exceptions.UnknownResourceException`

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

  
  *   :py:class:`RAM.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`RAM.Client.exceptions.ServerInternalException`

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

  