:doc:`QBusiness <../../qbusiness>` / Client / cancel_subscription

*******************
cancel_subscription
*******************



.. py:method:: QBusiness.Client.cancel_subscription(**kwargs)

  

  Unsubscribes a user or a group from their pricing tier in an Amazon Q Business application. An unsubscribed user or group loses all Amazon Q Business feature access at the start of next month.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/qbusiness-2023-11-27/CancelSubscription>`_  


  **Request Syntax**
  ::

    response = client.cancel_subscription(
        applicationId='string',
        subscriptionId='string'
    )
    
  :type applicationId: string
  :param applicationId: **[REQUIRED]** 

    The identifier of the Amazon Q Business application for which the subscription is being cancelled.

    

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

    The identifier of the Amazon Q Business subscription being cancelled.

    

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

    
    ::

      {
          'subscriptionArn': 'string',
          'currentSubscription': {
              'type': 'Q_LITE'|'Q_BUSINESS'
          },
          'nextSubscription': {
              'type': 'Q_LITE'|'Q_BUSINESS'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **subscriptionArn** *(string) --* 

        The Amazon Resource Name (ARN) of the Amazon Q Business subscription being cancelled.

        
      

      - **currentSubscription** *(dict) --* 

        The type of your current Amazon Q Business subscription.

        
        

        - **type** *(string) --* 

          The type of an Amazon Q Business subscription.

          
    
      

      - **nextSubscription** *(dict) --* 

        The type of the Amazon Q Business subscription for the next month.

        
        

        - **type** *(string) --* 

          The type of an Amazon Q Business subscription.

          
    
  
  **Exceptions**
  
  *   :py:class:`QBusiness.Client.exceptions.InternalServerException`

  
  *   :py:class:`QBusiness.Client.exceptions.ResourceNotFoundException`

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

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

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

  