:doc:`RAM <../../ram>` / Paginator / GetResourceShareAssociations

****************************
GetResourceShareAssociations
****************************



.. py:class:: RAM.Paginator.GetResourceShareAssociations

  ::

    
    paginator = client.get_paginator('get_resource_share_associations')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`RAM.Client.get_resource_share_associations`.

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


    **Request Syntax**
    ::

      response_iterator = paginator.paginate(
          associationType='PRINCIPAL'|'RESOURCE'|'SOURCE',
          resourceShareArns=[
              'string',
          ],
          resourceArn='string',
          principal='string',
          associationStatus='ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED'|'SUSPENDED'|'SUSPENDING'|'RESTORING',
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
      
    :type associationType: string
    :param associationType: **[REQUIRED]** 

      Specifies whether you want to retrieve the associations that involve a specified resource or principal.

       

      
      * ``PRINCIPAL`` – list the principals whose associations you want to see.
       
      * ``RESOURCE`` – list the resources whose associations you want to see.
      

      

    
    :type resourceShareArns: list
    :param resourceShareArns: 

      Specifies a list of `Amazon Resource Names (ARNs) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ of the resource share whose associations you want to retrieve.

      

    
      - *(string) --* 

      
  
    :type resourceArn: string
    :param resourceArn: 

      Specifies the `Amazon Resource Name (ARN) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ of a resource whose resource shares you want to retrieve.

       

      You cannot specify this parameter if the association type is ``PRINCIPAL``.

      

    
    :type principal: string
    :param principal: 

      Specifies the ID of the principal whose resource shares you want to retrieve. This can be an Amazon Web Services account ID, an organization ID, an organizational unit ID, or the `Amazon Resource Name (ARN) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ of an individual IAM role or user.

       

      You cannot specify this parameter if the association type is ``RESOURCE``.

      

    
    :type associationStatus: string
    :param associationStatus: 

      Specifies that you want to retrieve only associations that have this status.

      

    
    :type PaginationConfig: dict
    :param PaginationConfig: 

      A dictionary that provides parameters to control pagination.

      

    
      - **MaxItems** *(integer) --* 

        The total number of items to return. If the total number of items available is more than the value specified in max-items then a ``NextToken`` will be provided in the output that you can use to resume pagination.

        

      
      - **PageSize** *(integer) --* 

        The size of each page.

        

      
      - **StartingToken** *(string) --* 

        A token to specify where to start paginating. This is the ``NextToken`` from a previous response.

        

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

      
      ::

        {
            '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
                },
            ],
            'NextToken': 'string'
        }
        
      **Response Structure**

      

      - *(dict) --* 
        

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

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

          
          

          - *(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.

              
        
      
        

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

          A token to resume pagination.

          
    