:doc:`PartnerCentralAccountAPI <../../partnercentral-account>` / Client / cancel_connection

*****************
cancel_connection
*****************



.. py:method:: PartnerCentralAccountAPI.Client.cancel_connection(**kwargs)

  

  Cancels an existing connection between partners, terminating the partnership relationship.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/partnercentral-account-2025-04-04/CancelConnection>`_  


  **Request Syntax**
  ::

    response = client.cancel_connection(
        Catalog='string',
        Identifier='string',
        ConnectionType='OPPORTUNITY_COLLABORATION'|'SUBSIDIARY',
        Reason='string',
        ClientToken='string'
    )
    
  :type Catalog: string
  :param Catalog: **[REQUIRED]** 

    The catalog identifier where the connection exists.

    

  
  :type Identifier: string
  :param Identifier: **[REQUIRED]** 

    The unique identifier of the connection to cancel.

    

  
  :type ConnectionType: string
  :param ConnectionType: **[REQUIRED]** 

    The type of connection to cancel (e.g., reseller, distributor, technology partner).

    

  
  :type Reason: string
  :param Reason: **[REQUIRED]** 

    The reason for canceling the connection, providing context for the termination.

    

  
  :type ClientToken: string
  :param ClientToken: **[REQUIRED]** 

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

    This field is autopopulated if not provided.

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

    
    ::

      {
          'Catalog': 'string',
          'Id': 'string',
          'Arn': 'string',
          'OtherParticipantAccountId': 'string',
          'UpdatedAt': datetime(2015, 1, 1),
          'ConnectionTypes': {
              'string': {
                  'CreatedAt': datetime(2015, 1, 1),
                  'InviterEmail': 'string',
                  'InviterName': 'string',
                  'Status': 'ACTIVE'|'CANCELED',
                  'CanceledAt': datetime(2015, 1, 1),
                  'CanceledBy': 'string',
                  'OtherParticipant': {
                      'PartnerProfile': {
                          'Id': 'string',
                          'Name': 'string'
                      },
                      'SellerProfile': {
                          'Id': 'string',
                          'Name': 'string'
                      },
                      'Account': {
                          'Name': 'string'
                      }
                  }
              }
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Catalog** *(string) --* 

        The catalog identifier where the connection was canceled.

        
      

      - **Id** *(string) --* 

        The unique identifier of the canceled connection.

        
      

      - **Arn** *(string) --* 

        The Amazon Resource Name (ARN) of the canceled connection.

        
      

      - **OtherParticipantAccountId** *(string) --* 

        The AWS account ID of the other participant in the canceled connection.

        
      

      - **UpdatedAt** *(datetime) --* 

        The timestamp when the connection was last updated (canceled).

        
      

      - **ConnectionTypes** *(dict) --* 

        The list of connection types that were active before cancellation.

        
        

        - *(string) --* 
          

          - *(dict) --* 

            Detailed information about a specific connection type within a connection.

            
            

            - **CreatedAt** *(datetime) --* 

              The timestamp when this connection type was created.

              
            

            - **InviterEmail** *(string) --* 

              The email address of the person who initiated this connection type.

              
            

            - **InviterName** *(string) --* 

              The name of the person who initiated this connection type.

              
            

            - **Status** *(string) --* 

              The current status of this connection type.

              
            

            - **CanceledAt** *(datetime) --* 

              The timestamp when this connection type was cancelled, if applicable.

              
            

            - **CanceledBy** *(string) --* 

              The AWS account ID of the participant who cancelled this connection type.

              
            

            - **OtherParticipant** *(dict) --* 

              Information about the other participant in this connection type.

              .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``PartnerProfile``, ``SellerProfile``, ``Account``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                            'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


            
              

              - **PartnerProfile** *(dict) --* 

                The partner profile information for the participant.

                
                

                - **Id** *(string) --* 

                  The unique identifier of the partner profile.

                  
                

                - **Name** *(string) --* 

                  The display name of the partner.

                  
            
              

              - **SellerProfile** *(dict) --* 

                The seller profile information for the participant.

                
                

                - **Id** *(string) --* 

                  The unique identifier of the seller profile.

                  
                

                - **Name** *(string) --* 

                  The display name of the seller.

                  
            
              

              - **Account** *(dict) --* 

                The AWS account information for the participant.

                
                

                - **Name** *(string) --* 

                  The name associated with the AWS account.

                  
            
          
        
    
  
  
  **Exceptions**
  
  *   :py:class:`PartnerCentralAccountAPI.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`PartnerCentralAccountAPI.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`PartnerCentralAccountAPI.Client.exceptions.ThrottlingException`

  
  *   :py:class:`PartnerCentralAccountAPI.Client.exceptions.ConflictException`

  
  *   :py:class:`PartnerCentralAccountAPI.Client.exceptions.ValidationException`

  
  *   :py:class:`PartnerCentralAccountAPI.Client.exceptions.InternalServerException`

  