:doc:`KinesisAnalyticsV2 <../../kinesisanalyticsv2>` / Client / stop_application

****************
stop_application
****************



.. py:method:: KinesisAnalyticsV2.Client.stop_application(**kwargs)

  

  Stops the application from processing data. You can stop an application only if it is in the running status, unless you set the ``Force`` parameter to ``true``.

   

  You can use the  DescribeApplication operation to find the application status.

   

  Managed Service for Apache Flink takes a snapshot when the application is stopped, unless ``Force`` is set to ``true``.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/kinesisanalyticsv2-2018-05-23/StopApplication>`_  


  **Request Syntax**
  ::

    response = client.stop_application(
        ApplicationName='string',
        Force=True|False
    )
    
  :type ApplicationName: string
  :param ApplicationName: **[REQUIRED]** 

    The name of the running application to stop.

    

  
  :type Force: boolean
  :param Force: 

    Set to ``true`` to force the application to stop. If you set ``Force`` to ``true``, Managed Service for Apache Flink stops the application without taking a snapshot.

     

    .. note::

      

      Force-stopping your application may lead to data loss or duplication. To prevent data loss or duplicate processing of data during application restarts, we recommend you to take frequent snapshots of your application.

      

     

    You can only force stop a Managed Service for Apache Flink application. You can't force stop a SQL-based Kinesis Data Analytics application.

     

    The application must be in the ``STARTING``, ``UPDATING``, ``STOPPING``, ``AUTOSCALING``, or ``RUNNING`` status.

    

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

    
    ::

      {
          'OperationId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **OperationId** *(string) --* 

        The operation ID that can be used to track the request.

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

  
  *   :py:class:`KinesisAnalyticsV2.Client.exceptions.ResourceInUseException`

  
  *   :py:class:`KinesisAnalyticsV2.Client.exceptions.InvalidArgumentException`

  
  *   :py:class:`KinesisAnalyticsV2.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`KinesisAnalyticsV2.Client.exceptions.InvalidApplicationConfigurationException`

  
  *   :py:class:`KinesisAnalyticsV2.Client.exceptions.ConcurrentModificationException`

  