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

********************************
reject_resource_share_invitation
********************************



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

  

  Rejects an invitation to a resource share from another Amazon Web Services account.

  

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


  **Request Syntax**
  ::

    response = client.reject_resource_share_invitation(
        resourceShareInvitationArn='string',
        clientToken='string'
    )
    
  :type resourceShareInvitationArn: string
  :param resourceShareInvitationArn: **[REQUIRED]** 

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

    

  
  :type clientToken: string
  :param clientToken: 

    Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a `UUID type of value. <https://wikipedia.org/wiki/Universally_unique_identifier>`__.

     

    If you don't provide this value, then Amazon Web Services generates a random one for you.

     

    If you retry the operation with the same ``ClientToken``, but with different parameters, the retry fails with an ``IdempotentParameterMismatch`` error.

    

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

    
    ::

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

    

    - *(dict) --* 
      

      - **resourceShareInvitation** *(dict) --* 

        An object that contains the details about the rejected invitation.

        
        

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

          
    
      

      - **clientToken** *(string) --* 

        The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the ``clientToken`` request parameter of that later call. All other parameters must also have the same values that you used in the first call.

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

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

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

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

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

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

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

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

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

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

  