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

*****************************************
list_replace_permission_associations_work
*****************************************



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

  

  Retrieves the current status of the asynchronous tasks performed by RAM when you perform the  ReplacePermissionAssociationsWork operation.

   

  .. 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/ListReplacePermissionAssociationsWork>`_  


  **Request Syntax**
  ::

    response = client.list_replace_permission_associations_work(
        workIds=[
            'string',
        ],
        status='IN_PROGRESS'|'COMPLETED'|'FAILED',
        nextToken='string',
        maxResults=123
    )
    
  :type workIds: list
  :param workIds: 

    A list of IDs. These values come from the ``id``field of the ``replacePermissionAssociationsWork``structure returned by the  ReplacePermissionAssociations operation.

    

  
    - *(string) --* 

    

  :type status: string
  :param status: 

    Specifies that you want to see only the details about requests with a status that matches this value.

    

  
  :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**

    
    ::

      {
          'replacePermissionAssociationsWorks': [
              {
                  'id': 'string',
                  'fromPermissionArn': 'string',
                  'fromPermissionVersion': 'string',
                  'toPermissionArn': 'string',
                  'toPermissionVersion': 'string',
                  'status': 'IN_PROGRESS'|'COMPLETED'|'FAILED',
                  'statusMessage': 'string',
                  'creationTime': datetime(2015, 1, 1),
                  'lastUpdatedTime': datetime(2015, 1, 1)
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **replacePermissionAssociationsWorks** *(list) --* 

        An array of data structures that provide details of the matching work IDs.

        
        

        - *(dict) --* 

          A structure that represents the background work that RAM performs when you invoke the  ReplacePermissionAssociations operation.

          
          

          - **id** *(string) --* 

            The unique identifier for the background task associated with one  ReplacePermissionAssociations request.

            
          

          - **fromPermissionArn** *(string) --* 

            The `Amazon Resource Name (ARN) <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ of the managed permission that this background task is replacing.

            
          

          - **fromPermissionVersion** *(string) --* 

            The version of the managed permission that this background task is replacing.

            
          

          - **toPermissionArn** *(string) --* 

            The ARN of the managed permission that this background task is associating with the resource shares in place of the managed permission and version specified in ``fromPermissionArn`` and ``fromPermissionVersion``.

            
          

          - **toPermissionVersion** *(string) --* 

            The version of the managed permission that this background task is associating with the resource shares. This is always the version that is currently the default for this managed permission.

            
          

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

            Specifies the current status of the background tasks for the specified ID. The output is one of the following strings:

             

            
            * ``IN_PROGRESS``
             
            * ``COMPLETED``
             
            * ``FAILED``
            

            
          

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

            Specifies the reason for a ``FAILED`` status. This field is present only when there ``status`` is ``FAILED``.

            
          

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

            The date and time when this asynchronous background task was created.

            
          

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

            The date and time when the status of this background task was last updated.

            
      
    
      

      - **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.ServerInternalException`

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

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

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

  